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() {
116
116
if (isPom () || gradleConfiguration == INTEGRATION_TEST_IMPLEMENTATION_TEST_FIXTURES ) {
117
117
snippet += ")" ;
118
118
}
119
+ if (getArtifactId () == "spring-boot-devtools" ) {
120
+ snippet += " // Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications" ;
121
+ }
122
+
119
123
return snippet ;
120
124
}
121
125
}
Original file line number Diff line number Diff line change 19
19
package org .grails .forge .feature .reloading ;
20
20
21
21
import jakarta .inject .Singleton ;
22
+ import org .grails .forge .application .ApplicationType ;
22
23
import org .grails .forge .application .generator .GeneratorContext ;
23
24
import org .grails .forge .build .dependencies .Dependency ;
24
25
import 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 ;
25
29
30
+ import java .util .Set ;
26
31
27
32
@ Singleton
28
- public class SpringBootDevTools implements ReloadingFeature {
33
+ public class SpringBootDevTools implements ReloadingFeature , DefaultFeature {
29
34
@ Override
30
35
public String getName () {
31
36
return "spring-boot-devtools" ;
@@ -54,8 +59,18 @@ public boolean isVisible() {
54
59
return true ;
55
60
}
56
61
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
+
57
72
@ Override
58
73
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 " ;
60
75
}
61
76
}
Original file line number Diff line number Diff line change @@ -846,6 +846,11 @@ class GrailsGradlePlugin extends GroovyPlugin {
846
846
SourceSet mainSourceSet = SourceSets . findMainSourceSet(project)
847
847
it. classpath = mainSourceSet. runtimeClasspath + project. configurations. getByName(' console' )
848
848
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
+
849
854
List<Object > args = []
850
855
def otherArgs = project. findProperty(' args' )
851
856
if (otherArgs) {
@@ -873,6 +878,10 @@ class GrailsGradlePlugin extends GroovyPlugin {
873
878
it. classpath = mainSourceSet. runtimeClasspath + project. configurations. getByName(' console' )
874
879
it. systemProperty(Environment . KEY , System . getProperty(Environment . KEY , Environment . DEVELOPMENT . getName()))
875
880
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
+
876
885
List<Object > args = []
877
886
def otherArgs = project. findProperty(' args' )
878
887
if (otherArgs) {
You can’t perform that action at this time.
0 commit comments