In Kotlin, on Intellij using gradle to run the task bootRun for Spring Boot, I get the error that follows:
BUILD FAILED
Total time: 0.085 secs
Could not set unknown property 'addResources' for task ':bootRun'
of type org.springframework.boot.gradle.tasks.run.BootRun.
I am using kotlinVersion = '1.1.4-3', springBootVersion = '2.0.0.M3' and my bootrun task looks like the following in my gradle.build
bootRun
{
addResources = true
}
My bootRun works as expected without the adjustments to the bootRun task
You are using Spring Boot 2.0 where the addResources
property no longer exists. Instead, you need to set the sourceResources
property to the source set that you want to use. Typically that’s sourceSets.main
. This is described in the plugin’s documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With