Comments (4)
SNAPSHOT release is also fixed. Thanks for report!
from hotswapagent.
Doing some digging. Spring changed the signature of org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory#invokeCustomInitMethod
a while ago: spring-projects/spring-framework@41ee233
So here
diff --git a/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/transformers/BeanFactoryTransformer.java b/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/transformers/BeanFactoryTransformer.java
index 2341fdec..d2922c0b 100644
--- a/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/transformers/BeanFactoryTransformer.java
+++ b/plugin/hotswap-agent-spring-plugin/src/main/java/org/hotswap/agent/plugin/spring/transformers/BeanFactoryTransformer.java
@@ -76,7 +76,8 @@ public class BeanFactoryTransformer {
// try catch for custom init method
CtMethod invokeCustomInitMethod = clazz.getDeclaredMethod("invokeCustomInitMethod",
new CtClass[] {classPool.get(String.class.getName()), classPool.get("java.lang.Object"),
- classPool.get("org.springframework.beans.factory.support.RootBeanDefinition")});
+ classPool.get("org.springframework.beans.factory.support.RootBeanDefinition"),
+ classPool.get(String.class.getName())});
invokeCustomInitMethod.addCatch(
InitMethodEnhance.catchException("$2", "$$ha$LOGGER", "$e", "invokeCustomInitMethod", false),
classPool.get("java.lang.Throwable"));
Unsure how this needs to be done if you want to support both versions of that class.
from hotswapagent.
I see that there is only a single method invokeCustomInitMethod
in AbstractAutowireCapableBeanFactory
, so the clazz.getDeclaredMethod(methodName)
method of CtClass could be used, so the transformation would not depend on the method parameters.
from hotswapagent.
Woah thank you for the quick turn-around on this !
from hotswapagent.
Related Issues (20)
- Some API cannot work well in spring 6, such as org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor#postProcessPropertyValues is removed in spring6
- JDK 21 support HOT 1
- 热更新application.properties配置文件出现找不到变量错误怎么解决
- An error occurred during hot update of application.properties configuration file HOT 3
- Why does the hotswapagent 1.4.2-SNAPSHOT version of the jar not contain the springboot plug-in? HOT 6
- Mybatis hot update xml error
- Multiple instances of MapperScannerRegistrar appear, causing subsequent updates to fail
- Added an interface method. After hot update, a parameter error occurred in the request interface.
- Whether jdk21 version is supported HOT 1
- Mybatis was introduced into the project, and the properties prompt was updated: No qualifying bean of type 'org.springframework.core.env.ConfigurableEnvironment' available HOT 3
- java -jar update mybatis failure HOT 2
- nested exception HOT 1
- Help, the new Controller API interface cannot be hot updated. HOT 2
- 1.4.2-SNAPSHOT inner class hotswap fail HOT 2
- final static variable values duplicates when hot swap HOT 1
- Update xml sql in mybatis + spring boot project error and will not take effect HOT 1
- AnonymousClassPatchPlugin IllegalArgumentException
- Spring Plugin with Grails hitting a snag
- How should I debug the modified class? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotswapagent.