问题描述
使用gradle run无法热部署
版本描述
gradle4,springboot2
解决过程
参考链接 spring boot
注意点
还是需要导入
compile(‘org.springframework.boot:spring-boot-devtools’)
这个开发者包另外请将
bootRun{
sourceResources sourceSets.main
}
添加到build.gradle文件尾部否则会报
* What went wrong:
A problem occurred evaluating root project 'coursewareweb'.
> Could not find method bootRun() for arguments [build_ez5ztenpe2qvebnxqgh94tjwp$_run_closure2@33ffa8ad] on root project 'coursewareweb' of type org.gradle.api.Project.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
CONFIGURE FAILED in 0s
Could not find method bootRun() for arguments [build_ez5ztenpe2qvebnxqgh94tjwp$_run_closure2@33ffa8ad] on root project 'coursewareweb' of type org.gradle.api.Project.
Open File
这就和gradle加载顺序有关感兴趣的朋友深入研究一下