Was sind Benutzername und Passwort beim Starten von Spring Boot mit Tomcat?

Wenn ich meine Spring-Anwendung über Spring Boot bereitstelle und auf @ zugreilocalhost:8080 Ich muss mich authentifizieren, aber wie lautet der Benutzername und das Passwort oder wie kann ich es einstellen? Ich habe versucht, dies zu meinem @ hinzuzufügtomcat-users file aber es hat nicht funktioniert:

<role rolename="manager-gui"/>
    <user username="admin" password="admin" roles="manager-gui"/>

Dies ist der Ausgangspunkt der Anwendung:

@SpringBootApplication
public class Application extends SpringBootServletInitializer {

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

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(Application.class);
    }
}

Und das ist die Tomcat-Abhängigkeit:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-tomcat</artifactId>
    <scope>provided</scope>
</dependency>

Wie authentifiziere ich mich amlocalhost:8080?

Antworten auf die Frage(10)

Ihre Antwort auf die Frage