spring-hook

this is a project used for modifying code when project running

License

License

GroupId

GroupId

com.github.gx304419380
ArtifactId

ArtifactId

spring-hook
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

spring-hook
this is a project used for modifying code when project running
Source Code Management

Source Code Management

https://github.com/gx304419380/spring-hook

Download spring-hook

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.gx304419380/spring-hook/ -->
<dependency>
    <groupId>com.github.gx304419380</groupId>
    <artifactId>spring-hook</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.gx304419380/spring-hook/
implementation 'com.github.gx304419380:spring-hook:1.0.0'
// https://jarcasting.com/artifacts/com.github.gx304419380/spring-hook/
implementation ("com.github.gx304419380:spring-hook:1.0.0")
'com.github.gx304419380:spring-hook:jar:1.0.0'
<dependency org="com.github.gx304419380" name="spring-hook" rev="1.0.0">
  <artifact name="spring-hook" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.gx304419380', module='spring-hook', version='1.0.0')
)
libraryDependencies += "com.github.gx304419380" % "spring-hook" % "1.0.0"
[com.github.gx304419380/spring-hook "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar 2.4.2
org.javassist : javassist jar 3.27.0-GA

Project Modules

There are no modules declared in this project.

spring-hook

该框架使用Javassist和spring框架开发而成,可以实现运行时修改代码,替换指定的方法,在指定方法前后插入代码以及替换指定的class 可以用于线上项目紧急维护,bug定位等

#使用方法 ##1. 依赖引入到指定的项目

<dependency>
  <groupId>com.github.gx304419380</groupId>
  <artifactId>spring-hook</artifactId>
  <version>1.0.0</version>
</dependency>

##2. 在项目中添加注解:

@EnableSpringHook

##3. 启动项目

访问http://localhost:port/spring-hook

#图例

1.访问/spring-hook路径,进入dashboard,可以看到当前项目中所有的bean img_1.png 2.选择要修改的bean,可以进入bean详情,进行替换bean或者修改指定方法 img_2.png 3.点击指定方法,进入方法修改页面 img.png

Versions

Version
1.0.0