Spring boot application.properties file does not complete code automatically
I created a spring project using Spring Initializr in the IntelliJ IDE.
When I try to modify the application.properties file, I realize that it doesn’t autocomplete the code, I mean, it doesn’t show options and show “Integer” like you type “In”.
Also, if I try to run the application, localhost:8080/index.html
is redirected to http://localhost:8080/login
Any idea what the problem is?
Thanks
Just realized import lombok. Data; Also not highlighted, even if dependencies are set
Solution
First question:
… it does not autocomplete the code
You should make sure that your “Spring Boot” plugin is enabled. Seehere Learn how to manage plugins in Intellij IDEA.
Second question:
localhost:8080/index.html
is redirected tohttp://localhost:8080/login
To resolve the redirect issue, you should remove the maven dependency on spring-starter-security (such as user9717940 described). However, it can be caused by other security-related dependencies, such as Oauth. Go to your Maven pom.xml file and look for something similar to the code snippet below and remove it from your dependencies section.
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
In the future, please < a href="https://meta.stackoverflow.com/questions/371614/why-isnt-it-good-to-ask-multiple-questions-and-answers-in-one-question" rel="noreferrer noopener nofollow" > If you don’t quite understand what might be causing the problem, the two questions may seem related, so it’s understandable in this case.