Appearance
2.3.0
依赖更新
- Spring Boot
2.3.0.RELEASE - eureka-client
1.9.22 - hutool 5.3.5
- servo-core
0.13.0
Spring Cloud 依赖更新
- Spring Cloud
Hoxton.SR5
- Spring Cloud Contract
2.2.3.RELEASE - Spring Cloud Kubernetes
1.1.3.RELEASE - Spring Cloud Cloudfoundry
2.2.2.RELEASE - Spring Cloud Commons
2.2.3.RELEASE - Spring Cloud Starter Build
Hoxton.SR5 - Spring Cloud Netflix
2.2.3.RELEASE - Spring Cloud Consul
2.2.3.RELEASE - Spring Cloud Config
2.2.3.RELEASE - Spring Cloud Gateway
2.2.3.RELEASE - Spring Cloud Gcp
1.2.3.RELEASE - Spring Cloud Zookeeper
2.2.2.RELEASE - Spring Cloud Vault
2.2.3.RELEASE - Spring Cloud Circuitbreaker
1.0.3.RELEASE - Spring Cloud Bus
2.2.2.RELEASE - Spring Cloud Security
2.2.2.RELEASE - Spring Cloud Openfeign
2.2.3.RELEASE - Spring Cloud Aws
2.2.2.RELEASE - Spring Cloud Sleuth
2.2.3.RELEASE
Banner 更新
text
.--.
." o \__ Spring Boot 2.3.x
_.-" ,( ` Spring Cloud Hoxton.SR5
_.-" ,;;|
_.-=" _," ,,;;;'
.-"`_.-"``-..,,;;;;:'
`"'` `\`\
ax /^\\\.--.
." o \__ Spring Boot 2.3.x
_.-" ,( ` Spring Cloud Hoxton.SR5
_.-" ,;;|
_.-=" _," ,,;;;'
.-"`_.-"``-..,,;;;;:'
`"'` `\`\
ax /^\\\迁移、升级说明
注意: 此说明仅适用于 2.2.X 版本。
1、依赖更新
java<parent> <groupId>com.investoday.boot</groupId> <artifactId>spring-boot-starter-parent-x</artifactId> <version>2.3.0.X1.RELEASE</version> </parent> <dependency> <groupId>com.investoday.boot</groupId> <artifactId>common-invest</artifactId> <version>2.3.0-SNAPSHOT</version> </dependency><parent> <groupId>com.investoday.boot</groupId> <artifactId>spring-boot-starter-parent-x</artifactId> <version>2.3.0.X1.RELEASE</version> </parent> <dependency> <groupId>com.investoday.boot</groupId> <artifactId>common-invest</artifactId> <version>2.3.0-SNAPSHOT</version> </dependency>
构建分层jar应用于Docker镜像中
Spring Boot 2.3.0 开始支持jar分层,更好的优化打包镜像过程。 官方文档
开启
pom.xml中分层支持java<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <layers> <enabled>true</enabled> </layers> </configuration> </plugin><plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <layers> <enabled>true</enabled> </layers> </configuration> </plugin>Dockerfile 修改支持分层
核心是通过 Spring Boot 提供的
layertools工具将jar进行拆分,然后通过 COPY指令去分别加载。注意: 涉及到环境变量等配置请写到第2个镜像编译中bashFROM invest/jre3 as builder ADD test.jar /usr/application.jar # ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/usr/test.jar"] #分层 WORKDIR /usr RUN java -Djarmode=layertools -jar application.jar extract FROM invest/jre3 MAINTAINER belkuy VOLUME /tmp ENV TIMEZONE=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone COPY --from=builder /usr/dependencies/ ./ COPY --from=builder /usr/spring-boot-loader/ ./ COPY --from=builder /usr/snapshot-dependencies/ ./ COPY --from=builder /usr/application/ ./ EXPOSE 8390 ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]FROM invest/jre3 as builder ADD test.jar /usr/application.jar # ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/usr/test.jar"] #分层 WORKDIR /usr RUN java -Djarmode=layertools -jar application.jar extract FROM invest/jre3 MAINTAINER belkuy VOLUME /tmp ENV TIMEZONE=Asia/Shanghai RUN ln -snf /usr/share/zoneinfo/$TIMEZONE /etc/localtime && echo $TIMEZONE > /etc/timezone COPY --from=builder /usr/dependencies/ ./ COPY --from=builder /usr/spring-boot-loader/ ./ COPY --from=builder /usr/snapshot-dependencies/ ./ COPY --from=builder /usr/application/ ./ EXPOSE 8390 ENTRYPOINT ["java", "org.springframework.boot.loader.JarLauncher"]
新特性说明
- 可以使用来配置Redis的哨兵密码
spring.redis.sentinel.password。 spring-boot-autoconfigure-processor现在,来自的输出是可重复的,从而使其与Gradle的构建缓存更好地配合。
弃用
spring.http.已经迁移至server.servlet.encoding.``spring.mvc.和spring.codec.SpringApplication#refresh(ApplicationContext)已被废弃,新路径SpringApplication#refresh(ConfigurableApplicationContext)。server.error.include-stacktrac的属性值ON_TRACE_PARAM被重命名为ON_PARAM。org.springframework.boot.autoconfigure.elasticsearch.rest.RestClientBuilderCustomizer已被废弃,新路径org.springframework.boot.autoconfigure.elasticsearch.RestClientBuilderCustomizer