Application with Tomcat and Spring Boot

0

Hello

I have the following problem in my application. After running the main method below and typing in the browser the address of my application localhost: 9090 / restauranteWeb is opening a popUp requesting user and password, I thought it would be from tomcat, but my tomcat was installed without user and password. If someone has already gone through this and can help, I thank you!

@SpringBootApplication()
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }
}

PopUp that appears in the browser, the error in the background and then clicking cancel

    
asked by anonymous 24.06.2016 / 01:37

4 answers

1

Probably in your pom.xml file you have the following dependency:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-security</artifactId>
</dependency>

This dependency is part of the Spring Security package that is used to control user and other things. To understand how to use Spring Security in your application, click here .

    
10.11.2016 / 23:14
1

This message is displayed when Http Basic authentication is enabled by Spring Security, unlike other responses, you should not remove the dependency on your project, since it may be necessary in the future and the problem may come back.

In order to resolve the problem, you must configure Spring to disable Http Basic fault authentication, so add the following line to the application.properties file:

security.basic.enabled=false

    
22.05.2017 / 02:28
0

I believe you have dependency on spring-security in your project.

According to the spring boot documentation, if you have spring-security in your classpath, spring-boot will automatically configure your project with Basic.

  If Spring Security is on the classpath then web applications will be secured by default with 'basic' authentication on all HTTP endpoints.

Take a look at here .

    
28.09.2016 / 01:08
0

You are probably dependent on Spring Security in your pom.xml

Just remove this dependency and run the project again.

    
22.05.2017 / 01:44