我有一个使用Intellij IDE运行良好的Spring启动应用程序.即我启动了具有委托给SpringApplication.run的main方法的Application类.除了hotswap,一切都很好.当我更改源代码时,我被迫重新启动应用程序.即使我在调试模式下启动应用程序,我也看不到hotswap工作.我可以看到Intellij的Debug设置启用了hotswap.
我的观察表明,当我运行springboot应用程序时,使用的类路径是我的
/projects/MyProject/classes/production/....
classes/production更改代码时,下面的文件没有更新.Intellij IDE编译文件但不更新classes/production目录.如何使用IntelliJ IDE进行spring-boot热插拔?
我正在使用带有gradle插件的Spring Boot 1.3.2.在我的多部分项目中,HTML/JS/CSS文件的热交换/重新加载不起作用.
/resources
|-wro.groovy
|-application.yml
|-/templates/(all *.html files and index.html)
|-/static/
|-/js/
|-/css/
Run Code Online (Sandbox Code Playgroud)
application.yml
server:
port: 8080
spring:
thymeleaf:
cache: false
prefix: classpath:/templates/
suffix: .html
enabled: true
encoding: UTF-8
mode: HTML5
Run Code Online (Sandbox Code Playgroud)
在te projet中也使用了:wro4j,thymeleaf,AngularJS
部分gradle.build
buildscript {
ext { springBootVersion = '1.3.2.RELEASE' }
repositories {
maven {
url "https://ourartifactoryUrl/plugins-release"
credentials {
// artifactory log and pass
}
}
}
dependencies {
classpath group: 'org.springframework.boot', name: 'spring-boot-gradle-plugin', version: springBootVersion
classpath group: 'io.spring.gradle', name: 'dependency-management-plugin', version: '0.5.2.RELEASE'
classpath group: 'org.jfrog.buildinfo', name: …Run Code Online (Sandbox Code Playgroud)