Spring Boot project shows the Login page
That is the default behavior. to change this, you have a few options:
You can remove the Spring Boot Security dependency:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
You can desable autoconfiguration. To do so; in your main class, to: @SpringBootApplication
append: (exclude = { SecurityAutoConfiguration.class })
so that it looks like:
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class })
public static void main(String[] args) {
SpringApplication.run(SpringBootSecurityApplication.class, args);
}
}
you can also do this from the application.properties file
For more information on desableing Auto-Configuration and setting up your own. Reference: Spring Boot Security Auto-Configuration
If you don't want login page (from Spring-Security
) remove the following dependency from your pom.xml
and do maven
update to refresh the dependencies on the class path.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
Or if you want to use the Spring-Security
then on console
it will display the default password like below :
Using default security password: ce6c3d39-8f20-4a41-8e01-803166bb99b6
the default username will be user