4

I need to use spring boot devtools to force reload of static resource during dev time.

I added follow code to my pom

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

but maven did not found the dependecy,

I need to add respoitory uri?

2 Answers 2

4

If you are not using a parent pom nor defined <DependencyManagement> there, then you should identify the version of jar you want to use.

likes:

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>1.5.9.RELEASE</version> <optional>true</optional> <scope>runtime</scope> </dependency> 

You can check out http://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools to see which version you would like to use.

Sign up to request clarification or add additional context in comments.

6 Comments

same result with version.
Sorry I'm a little bit confused. By saying 'maven did not found the dependecy', did you mean maven cannot download the jar, or you mean the auto reload doesn't work?
The first. Maven can not download the jar. Both dependecy and version are red. The error is 'Dependency 'org.springframework.boot:spring-boot-devtools:1.5.10.RELEASE' not found'
I think there's an issue on maven repository. I install it manually. It's stupid lose hours for this kind of problem if there is a workaround solve it.
Looks like the error message is given by IDEA? You can try running mvn verify directly, see what is maven error message.
|
0

What worked in my project me was adding the dependency inside the tag dependencyManagement

<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <version>3.1.2</version> </dependency> </dependencies> </dependencyManagement> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.