Когда я развертываю приложение Spring через Spring Загрузка и доступ localhost:8080
, мне нужно пройти аутентификацию, но что такое имя пользователя и пароль или как я могу установить его? Я попытался добавить это в мой файл tomcat-users
, но он не сработал:
<role rolename="manager-gui"/>
<user username="admin" password="admin" roles="manager-gui"/>
Это отправная точка приложения:
@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);
}
}
И это зависимость от Tomcat:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
Как выполнить проверку подлинности на localhost:8080
?