File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed
grails-forge/grails-forge-core/src/main/java/org/grails/forge
grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ public String toSnippet() {
116116 if (isPom () || gradleConfiguration == INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES ) {
117117 snippet += ")" ;
118118 }
119+ if (getArtifactId () == "spring-boot-devtools" ) {
120+ snippet += " // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications" ;
121+ }
122+
119123 return snippet ;
120124 }
121125}
Original file line number Diff line number Diff line change 1919package org .grails .forge .feature .reloading ;
2020
2121import jakarta .inject .Singleton ;
22+ import org .grails .forge .application .ApplicationType ;
2223import org .grails .forge .application .generator .GeneratorContext ;
2324import org .grails .forge .build .dependencies .Dependency ;
2425import org .grails .forge .build .dependencies .Scope ;
26+ import org .grails .forge .feature .DefaultFeature ;
27+ import org .grails .forge .feature .Feature ;
28+ import org .grails .forge .options .Options ;
2529
30+ import java .util .Set ;
2631
2732@ Singleton
28- public class SpringBootDevTools implements ReloadingFeature {
33+ public class SpringBootDevTools implements ReloadingFeature , DefaultFeature {
2934 @ Override
3035 public String getName () {
3136 return "spring-boot-devtools" ;
@@ -54,8 +59,18 @@ public boolean isVisible() {
5459 return true ;
5560 }
5661
62+ @ Override
63+ public boolean shouldApply (ApplicationType applicationType , Options options , Set <Feature > selectedFeatures ) {
64+ return true ;
65+ }
66+
67+ @ Override
68+ public boolean supports (ApplicationType applicationType ) {
69+ return true ;
70+ }
71+
5772 @ Override
5873 public String getDocumentation () {
59- return "https://docs.spring.io/spring-boot/docs/2.7.12/ reference/htmlsingle/# using. devtools" ;
74+ return "https://docs.spring.io/spring-boot/reference/using/ devtools.html " ;
6075 }
6176}
Original file line number Diff line number Diff line change @@ -846,6 +846,11 @@ class GrailsGradlePlugin extends GroovyPlugin {
846846 SourceSet mainSourceSet = SourceSets . findMainSourceSet(project)
847847 it. classpath = mainSourceSet. runtimeClasspath + project. configurations. getByName(' console' )
848848 it. systemProperty(Environment . KEY , System . getProperty(Environment . KEY , Environment . DEVELOPMENT . getName()))
849+
850+ // devtools' automatic restart mechanism uses a specialized classloader setup, which can interfere
851+ // with Grails' plugin management and bean wiring when running CLI scripts via Gradle
852+ it. systemProperty ' spring.devtools.restart.enabled' , ' false'
853+
849854 List<Object > args = []
850855 def otherArgs = project. findProperty(' args' )
851856 if (otherArgs) {
@@ -873,6 +878,10 @@ class GrailsGradlePlugin extends GroovyPlugin {
873878 it. classpath = mainSourceSet. runtimeClasspath + project. configurations. getByName(' console' )
874879 it. systemProperty(Environment . KEY , System . getProperty(Environment . KEY , Environment . DEVELOPMENT . getName()))
875880
881+ // devtools' automatic restart mechanism uses a specialized classloader setup, which can interfere
882+ // with Grails' plugin management and bean wiring when running CLI commands via Gradle
883+ it. systemProperty ' spring.devtools.restart.enabled' , ' false'
884+
876885 List<Object > args = []
877886 def otherArgs = project. findProperty(' args' )
878887 if (otherArgs) {
You can’t perform that action at this time.
0 commit comments