본문 바로가기

😡 문제 상황

백엔드와 프론트엔드를 연결시키려고 Spring boot Run을 하였는데 하자마자 아무런 에러 없이 finished with exit code 0이 되었다.

😥 해결하는 과정

오류 메시지가 없이 원하는 동작을 안 한 적은 처음이라 검색을 뭐라고 해야 할지 고민했다. 

일단, 실행이 안되는 거니깐 "spring boot 서버 실행 안됨"이라고 검색하였다.

 

운이 좋았는지 상단에 나랑 같은 현상이 있는 블로그 글을 발견하였다!!

https://grast.tistory.com/52

😁 해결!!

WAS 기능을 할 레포지토리가 없어서 생긴 문제였다. (Pure Java로 테스트 코드를 돌리는 메이븐 프로젝트에 불과함)
스프링 부트용 톰캣을 메이븐에 추가해주었다.
pom.xml에 추가해주었다. 

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>


spring-boot-starter-web를 추가해주었지만 다른 서버가 필요하면 spring-boot-starter-webflux 등 상황에 맞게 추가해주면 된다.

😊 참고

https://grast.tistory.com/52 [Real Vectorism. 훨씬 더 입체적으로...:티스토리]

개발의 각궁

Spring | Spring MVC | Spring Boot | Spring Security | Mysql | Oracle | PostgreSQL | Mybatis | JPA | Angular.js | Vue.js | Nuxt.js | React.js | TypeScript | JSP | Frontend | Backend