티스토리 뷰

aws eb에서 spring boot안뜰 때

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;
 
@Slf4j
@EnableCaching
@SpringBootApplication
@EnableScheduling
public class Server extends SpringBootServletInitializer {
 
    public static void main(String[] args) {
        SpringApplication.run(Server.class, args);
    }
}
 
cs

그냥 기본적으로 빌드해서 eb에 올리면 파란불은 들어오는데 스프링 부트가 안뜬다.

이게 aws eb에서 tomcat 환경에 올리면 tomcat만 뜨고 만다.

SpringBootServletInitializer 이걸 extends해주면 aws eb에 springboot .war를 올렸을 때 spring boot가 뜬다

end.



공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/03   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함