Skip to content

Set spring boot dev tools as a default feature in forge to match profiles #14921

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

Merged
merged 4 commits into from
Jul 18, 2025

Conversation

jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Jul 17, 2025

This matches the default in Grails 5.x.x and Grails 6.2.1+, for grails-shell generated applications.

This PR also resolves a conflict between spring boot dev tools and runCommand and runScript gradle tasks.

#13523
#13509
#11588

Copy link
Contributor

@jdaugherty jdaugherty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm okay with this becoming a default, but given that it's caused applications to fail startup in obscure ways, there needs to be a comment above this dependency warning that it can cause such failures.

@jamesfredley
Copy link
Contributor Author

Comment added:

developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns on larger applications

@jamesfredley jamesfredley requested a review from jdaugherty July 17, 2025 22:43
@jdaugherty
Copy link
Contributor

jdaugherty commented Jul 17, 2025

Comment added:

developmentOnly "org.springframework.boot:spring-boot-devtools" // Spring Boot DevTools may cause performance slowdowns on larger applications

How about:

// Spring Boot DevTools may cause performance slowdowns or compatibility issues on larger applications

@jdaugherty
Copy link
Contributor

Doesn't this also resolve #11588 ?

@jamesfredley
Copy link
Contributor Author

It does also resolve #11588 since the run-command script

argument name: "Command Name", description: "The name of the command to be executed"
calls the Gradle runCommand task.

@jamesfredley jamesfredley linked an issue Jul 17, 2025 that may be closed by this pull request
4 tasks
@jamesfredley
Copy link
Contributor Author

./grailsw run-command hello-world
Updated wrapper to version: 7.0.0-SNAPSHOT

> Task :runCommand
19:34:49.741 [main] INFO org.springframework.boot.devtools.restart.RestartApplicationListener -- Restart disabled due to System property 'spring.devtools.restart.enabled' being set to false

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/

 :: Spring Boot ::                (v3.5.3)

Grails application running at http://localhost:0 in environment: development
hello word

BUILD SUCCESSFUL in 16s
8 actionable tasks: 4 executed, 4 up-to-date

@jamesfredley jamesfredley added this to the grails:7.0.0-RC1 milestone Jul 17, 2025
@jamesfredley jamesfredley merged commit b168932 into 7.0.x Jul 18, 2025
33 checks passed
@jamesfredley jamesfredley deleted the spring-dev-tools-default branch July 18, 2025 02:22
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails 7.0.x Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
2 participants