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

后端 未结 2 470
孤街浪徒
孤街浪徒 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.

提交回复
热议问题