반응형
스프링 부트: Spring Boot Servlet이니셜라이저는 권장되지 않습니다.
다음과 같이 JBoss에 Spring Boot 앱을 도입하려고 합니다.정상적으로 동작했지만 Spring Boot Servlet이니셜라이저는 1.4.0에서는 권장되지 않습니다.풀어주다.어떤 걸로 할까요?
메이븐 디펜시
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
자바 코드
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.web.SpringBootServletInitializer;
@SpringBootApplication
public class DemoApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
사용하고 있습니다.org.springframework.boot.context.web.SpringBootServletInitializer
이것은 권장되지 않습니다.대신:
사용하다
org.springframework.boot.web.support.SpringBootServletInitializer
Spring Boot 2.0의 경우
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
한 번 해봐도 돼. 날 위해 일했어.
import org.springframework.boot.web.servlet.ServletContextInitializer;
언급URL : https://stackoverflow.com/questions/38843015/spring-boot-springbootservletinitializer-is-deprecated
반응형
'source' 카테고리의 다른 글
PowerShell : 필드 값으로 JSON 개체를 검색합니다. (0) | 2023.04.04 |
---|---|
페이지 새로고침 시 리액트 라우터에서 location.state를 클리어하려면 어떻게 해야 합니까? (0) | 2023.04.04 |
AngularJS 실패한 리소스 GET (0) | 2023.04.04 |
ASP에서 View Model을 JSON 개체로 변환하는 방법.NET MVC? (0) | 2023.04.04 |
Angular에서 모듈과 네임스페이스/이름 충돌JS (0) | 2023.04.04 |