How to set up a spring-boot application with java 13

后端 未结 2 467
孤街浪徒
孤街浪徒 2021-01-05 00:38

I am creating a spring-boot application, which is running and performing well with openJdk12. The application: https://github.com/jactor-rises/jactor-persistence

I a

相关标签:
2条回答
  • 2021-01-05 01:15

    As mentioned here, you can migrate your project to Spring boot version 2.2.0.
    Also, you need to upgrade your build tool(Here I have used Gradle).
    Sample project: Github

    1. Get/update gradle to 6.0-rc-1, make sure you point to java-8/11(i.e. JAVA_HOME is set to java-8/11) until you upgrade gradle.
      ./gradlew wrapper --gradle-version=6.0-rc-1 --distribution-type=all
      There is known bug,bug-1 for gradle with java-13, which is fixed in 6.0-rc-1 version.

    2. Get OpenJDK-13 from here, set JAVA_HOME to java-13

    3. As mention by @dirk-deyne in comment update ASM too, Ref
    4. Build your project

    P.S. If you use https://start.spring.io/, make sure you select java version 13.

    0 讨论(0)
  • 2021-01-05 01:24

    You should migrate to using spring-boot 2.2.0 which includes the migration to using Spring Framework 5.2.0 which extends supports until Java-14.

    Reference - Spring-Framework-Versions#jdk-version-range

    Here are the Draft Release Notes for further information and references and the current version to test this out would be 2.2.0-RC1.

    Update [16 October, 2019]: Spring Boot 2.2.0 has been released.

    0 讨论(0)
提交回复
热议问题