Almas Abdrazak
Almas Abdrazak

Reputation: 3612

Spring boot dev tools not working in Net beans

I have read about spring boot dev tools and want to try it, I add the following to my pom

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>

And turn on devtools restart manual trigger in Net beans options. To run i use the following option org.springframework.boot:spring-boot-maven-plugin:1.3.2.RELEASE:run in Run Project-> Execute Goals But when i change smth in code , project isn't rerun. What did i miss?

Upvotes: 1

Views: 2587

Answers (1)

Mayank Sharma
Mayank Sharma

Reputation: 423

Click under the project Properties -> Build -> Compile is a checkbox "Compile On Save" which is ticked. Verified that this actually works by modifying .java file and checking the timestamps in the /target/classes.

Also by changing Execute goals in Run project Action in Netbeans project properties to the following:

process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec

Configuring explicit resource directory location (in my case src/main/resources) to pom.xml resolves the problem of not reloading:

<build>
   ...
   <resources>
     <resource>
       <directory> src/main/resources </directory>
     </resource>
   </resources>
  ... 
 </build>

Upvotes: 2

Related Questions