Web Programing!/JAVA / JSP
[spring boot] context-path, 포트 설정
어설픈봉봉이
2019. 9. 20. 09:00
반응형
SMALL
[spring boot] context-path, 포트 설정
프로젝트를 만들고 실행하게 되면 기본 설정인 http://localhost:8080/ 으로 접속하면 초기 화면이 나온다.
context-path 추가
src/main/resources/application.properties
server.servlet.context-path=/www
설정시 http://localhost:8080/www로 접속가능.
server.port=80
설정시 http://localhost/www로 접속가능.
그 외 spring boot 에서 제공하는 많은 option들은 아래 링크에서 확인하면 된다.
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
반응형