main에 @ServletComponentScan 을 달아주면된다.
@ServletComponentScan //서블릿 직접등록후 사용하겠음.
package hello.servlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
@ServletComponentScan //서블릿 직접등록후 사용하겠음.
@SpringBootApplication
public class ServeltApplication {
public static void main(String[] args) {
SpringApplication.run(ServeltApplication.class, args);
}
}
'Java > Spring-MVC' 카테고리의 다른 글
[MVC] Servlet 실습 / 터미널에서 http 로그 찍는법 (0) | 2024.08.25 |
---|---|
Lombok 설정법 (0) | 2024.08.25 |
IntelliJ 빌드 속도 올리는법 (0) | 2024.08.25 |
Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 해결 (0) | 2024.08.25 |