Comments (15)
It should be supported, please modify the version to 1.5.18 and try it. @xiaolongyuan
from rocketmq-spring.
Not supported.
ListenerContainerConfiguration.java
private void registerContainer(String beanName, Object bean) {
Class<?> clazz = AopUtils.getTargetClass(bean);
if (!RocketMQListener.class.isAssignableFrom(bean.getClass())) {
throw new IllegalStateException(clazz + " is not instance of " + RocketMQListener.class.getName());
} else {
RocketMQMessageListener annotation = (RocketMQMessageListener)clazz.getAnnotation(RocketMQMessageListener.class);
this.validate(annotation);
String containerBeanName = String.format("%s_%s", DefaultRocketMQListenerContainer.class.getName(), this.counter.incrementAndGet());
GenericApplicationContext genericApplicationContext = (GenericApplicationContext)this.applicationContext;
genericApplicationContext.registerBean(containerBeanName, DefaultRocketMQListenerContainer.class, () -> {
return this.createRocketMQListenerContainer(bean, annotation);
}, new BeanDefinitionCustomizer[0]);
DefaultRocketMQListenerContainer container = (DefaultRocketMQListenerContainer)genericApplicationContext.getBean(containerBeanName, DefaultRocketMQListenerContainer.class);
if (!container.isRunning()) {
try {
container.start();
} catch (Exception var9) {
log.error("Started container failed. {}", container, var9);
throw new RuntimeException(var9);
}
}
log.info("Register the listener to container, listenerBeanName:{}, containerBeanName:{}", beanName, containerBeanName);
}
}
genericApplicationContext.registerBean is Spring 5.x
from rocketmq-spring.
from rocketmq-spring.
from rocketmq-spring.
It can work in my test after change to<spring.boot.version>1.5.18.RELEASE</spring.boot.version> rocketmq-spring-boot-parent/pom.xml
- changed the spring.boot.version to 1.5.18.RELEASE
- cd rocketmq-spring/
- mvn clean install -Dmaven.test.skip
- run the samples and verify:
cd rocketmq-spring-samples
mvn clean package
from rocketmq-spring.
spring boot 1.5.x依赖为 4.3.x
from rocketmq-spring.
from rocketmq-spring.
The official release version supports Spring boot 2.x + Spring 5.X, the latest spring version.
The issue title should be "support Spring 4.x + Spring 1.X", this is a back-forward compatible issue. we need some investigation and figure out how to support both.
from rocketmq-spring.
Here is a potential fix: #25
But it might not be checked in due to the official release will support Spring-boot 2.X only.
from rocketmq-spring.
@walking98 Why support Spring-boot 2.X only ?
from rocketmq-spring.
@xiaolongyuan
1.
2.
3.
我本地运行demo是OK没有发现明显报错.
from rocketmq-spring.
@xiaolongyuan
1.
2.
3.
我本地运行demo是OK没有发现明显报错.
我用你这个改动,mvn clean package 编译就有报错.
我也觉得@walking98 应该支持低版本的spring boot 哇
不然很多使用低版本的springboot的服务,都得为了引入你这个jar包,然后去升级版本,升级版本可能会带来更多不可预料的问题
from rocketmq-spring.
@zhao41654828 我现在用的是 pull里面的那个方案 后面准备全面升级至spring boot 2了
from rocketmq-spring.
Hope this discussion will help you understand why we no longer support spring boot 1.x
#25
from rocketmq-spring.
@zhao41654828 我现在用的是 pull里面的那个方案 后面准备全面升级至spring boot 2了
嗯,我也尝试切spring boot 2 吧
from rocketmq-spring.
Related Issues (20)
- 配置文件不能自动装配RocketMQAutoConfiguration HOT 2
- why setRequestTimeout use Duration.ofDays
- Support Springboot 3.X
- Release blocker of RocketMQ-Spring 2.3.0 HOT 1
- will handleMessage be public,so users can do some intecept before consumeMessage
- Is there a plan to release a version that is compatible with Springboot 3
- 在rocketmq服务端未启动的情况下,启动springboot报错 HOT 4
- 5.0 grpc client add config enableSsl
- Compilation failed
- Make v5 sample logs to output normally
- Exclude annotations-api to make spring-boot start normally
- Bump rocketmq version to 5.2.0
- RocketMQ监听者收到消息后发送到其他Topic时报空指针异常
- Native-image之后无法连接namesvr,但是在jdk环境里面可以连接
- The code for version 2.3.0 seems to be fine now. Could you package it when you have time and upload it to the Maven Central Repository? HOT 3
- Upgrade samples version to 2.3.1-SNAPSHOT
- BUG REPORT:rocketmq-spring-boot-2.2.3.jar HOT 3
- sendAndReceive方法能否接收到响应,对于消费者和生产者的启动顺序是否有要求? HOT 1
- A project cannot use the same consumer group HOT 3
- Document what the difference between rocketmq-spring-boot-starter and rocketmq-v5-client-spring-boot-starter
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 rocketmq-spring.