Skip to content

AOT processing does not work when Devtools is on the classpath #32517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wilkinsona opened this issue Sep 27, 2022 · 0 comments
Closed

AOT processing does not work when Devtools is on the classpath #32517

wilkinsona opened this issue Sep 27, 2022 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

When Devtools is on the classpath, AOT processing does not hook in correctly and the app starts up fully. Here's some output from demo-aot-native having added a dependency on spring-boot-devtools:

[INFO] --- spring-boot-maven-plugin:3.0.0-SNAPSHOT:process-aot (process-aot) @ demo-aot-native ---
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/maven-metadata.xml
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/maven-metadata.xml (2.4 kB at 9.7 kB/s)
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/spring-boot-buildpack-platform-3.0.0-20220927.064405-833.pom
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/spring-boot-buildpack-platform-3.0.0-20220927.064405-833.pom (3.4 kB at 13 kB/s)
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/maven-metadata.xml
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/maven-metadata.xml (2.4 kB at 9.7 kB/s)
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/spring-boot-loader-tools-3.0.0-20220927.064405-833.pom
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/spring-boot-loader-tools-3.0.0-20220927.064405-833.pom (2.3 kB at 8.8 kB/s)
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/spring-boot-buildpack-platform-3.0.0-20220927.064405-833.jar
Downloading from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/spring-boot-loader-tools-3.0.0-20220927.064405-833.jar
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-loader-tools/3.0.0-SNAPSHOT/spring-boot-loader-tools-3.0.0-20220927.064405-833.jar (246 kB at 325 kB/s)
Downloaded from spring-snapshots: https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-buildpack-platform/3.0.0-SNAPSHOT/spring-boot-buildpack-platform-3.0.0-20220927.064405-833.jar (247 kB at 307 kB/s)

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::       (v3.0.0-SNAPSHOT)

2022-09-27T08:07:30.004+01:00  INFO 55771 --- [  restartedMain] c.example.demo.DemoAotNativeApplication  : Starting DemoAotNativeApplication using Java 17.0.4 on wilkinsona-a01.vmware.com with PID 55771 (/Users/awilkinson/dev/snicoll/demo-aot-native/target/classes started by awilkinson in /Users/awilkinson/dev/snicoll/demo-aot-native)
2022-09-27T08:07:30.007+01:00  INFO 55771 --- [  restartedMain] c.example.demo.DemoAotNativeApplication  : No active profile set, falling back to 1 default profile: "default"
2022-09-27T08:07:30.056+01:00  INFO 55771 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
2022-09-27T08:07:30.057+01:00  INFO 55771 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
2022-09-27T08:07:30.883+01:00  INFO 55771 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2022-09-27T08:07:30.890+01:00  INFO 55771 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2022-09-27T08:07:30.890+01:00  INFO 55771 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/10.0.23]
2022-09-27T08:07:30.936+01:00  INFO 55771 --- [  restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2022-09-27T08:07:30.938+01:00  INFO 55771 --- [  restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 878 ms
2022-09-27T08:07:31.200+01:00  INFO 55771 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2022-09-27T08:07:31.221+01:00  INFO 55771 --- [  restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2022-09-27T08:07:31.228+01:00  INFO 55771 --- [  restartedMain] c.example.demo.DemoAotNativeApplication  : Started DemoAotNativeApplication in 1.557 seconds (process running for 1.867)

Generally speaking, Gradle will not be affected by this problem. When used, the developmentOnly configuration prevents the Devtools dependency from polluting the AOT processing classpath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant