Skip to content
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

devtools are NOT automatically disabled when running a fully packaged application. #7328

Closed
kazuki-ma opened this issue Nov 6, 2016 · 3 comments
Labels
status: duplicate A duplicate of another issue

Comments

@kazuki-ma
Copy link

According to document, spring-boot-devtools are automatically disabled in fully packaged application. But NOT.

http://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html

Developer tools are automatically disabled when running a fully packaged application. If your application is launched using java -jar or if it’s started using a special classloader, then it is considered a “production application”.

Environment

org.springframework.boot:spring-boot-devtools:1.4.1.RELEASE
org.springframework.boot:spring-boot-starter-thymeleaf:1.4.1.RELEASE

Reproduce

I created a sample project.

Please checkout https://github.com/kazuki-ma/devtools-report.
and run ./gradlew clean assemble && java -jar ./build/libs/devtools-report-1.0-SNAPSHOT.jar

This sample contains a single bean annotated @SpringBootApplication and has one method annotated @PostConstruct. In the method, just output spring.thymeleaf.cache's value and exit(0) .

After running assembled jar, we will see

spring.thymeleaf.cache = false

will be logged.
Expected is

spring.thymeleaf.cache = NOT_SET

Other

If I exclude spring-boot-devtools from fat jar by adding

springBoot {
    excludeDevtools = true
}

into build.gradle. spring.thymeleaf.cache = NOT_SET is logged as expected.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 6, 2016
@snicoll
Copy link
Member

snicoll commented Nov 6, 2016

Duplicates #7014

@snicoll snicoll closed this as completed Nov 6, 2016
@snicoll snicoll added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 6, 2016
@kazuki-ma
Copy link
Author

kazuki-ma commented Nov 6, 2016

Thanks! We may need fix documentation of excludeDevtools = true is default.

@snicoll
Copy link
Member

snicoll commented Nov 6, 2016

It's already done (and it's only the case of 1.5.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants