alibaba / alibaba-rsocket-broker

Alibaba RSocket Broker: Mesh, Streaming & IoT
https://alibroker.info
Apache License 2.0
761 stars 166 forks source link

java 17 支持 #215

Closed sdack-cloud closed 1 year ago

sdack-cloud commented 1 year ago

升级了spring boot 3.0 出现了错误

Parameter 0 of method abcService in ServicesAutoConfiguration required a bean of type 'com.alibaba.rsocket.upstream.UpstreamManager' that could not be found.

The injection point has the following annotations:
        - @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type 'com.alibaba.rsocket.upstream.UpstreamManager' in your configuration.
sdack-cloud commented 1 year ago

@linux-china

linux-china commented 1 year ago

@sdack-cloud spring.factories 的调整啦,需要添加新的配置方式 https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.developing-auto-configuration 此外还需要调整一下Reactor相关的API,如TopicProcessor已经被废弃删除啦。

已经调整完毕啦,最新的SNAPSHOT版本已经支持Spring Boot 3.0,你可以使用以下命令然后本机测试一下。

$ mvn -pl .,alibaba-rsocket-service-common,alibaba-rsocket-core,alibaba-rsocket-spring-boot-starter,alibaba-broker-spring-boot-starter -DskipTests clean source:jar install

如果没有问题,我会下周发布一个新的版本,兼容Spring Boot 3.0

sdack-cloud commented 1 year ago
截屏2022-12-03 08 58 52

image 遇到些问题

docker 镜像也更新哦

linux-china commented 1 year ago

Spring Boot 3的兼容主要是Alibaba RSocket对应的开发包,而不是Alibaba RSocket Broker Server本身,目前Alibaba RSocket Broker还不能升级到Spring Boot 3,主要是控制台界面使用Vaadin开发,这个还没有做到Spring Boot 3的兼容,这个要等一下Vaadin进行升级。 但是RSocket Broker就是一个独立的服务应用,不影响你的其他Spring Boot 3的应用接入。

你这个编译问题,你自己排查一下。 Alibaba RSocket Broker的GitHub Actions的持续集成都是没有问题的 https://github.com/alibaba/alibaba-rsocket-broker/actions 你看一下是否要 mvn clean一下先。

linux-china commented 1 year ago

一个样例: https://github.com/alibaba-rsocket-broker/alibaba-rsocket-boot3-demo

sdack-cloud commented 1 year ago

/alibaba-rsocket-boot3-demo

截屏2022-12-05 09 41 42
linux-china commented 1 year ago

@sdack-cloud 这个是snapshot版本,你要本地编译安装一下,这个是Java程序员最基本的要求 ;)

# install artifact into local repository
artifacts-install:
  mvn -pl .,alibaba-rsocket-service-common,alibaba-rsocket-core,alibaba-rsocket-spring-boot-starter,alibaba-broker-spring-boot-starter -DskipTests clean source:jar install
sdack-cloud commented 1 year ago

Running with Spring Boot v3.0.0, Spring v6.0.2 正常启动

linux-china commented 1 year ago

1.1.4已经发布,兼容Spring Boot 3.0.0