spring 개발환경 구성하기
spring 공식 웹사이트 이동 https://spring.io/docs
SPRING INITIALIZR
기본 Dependencies
- Web
- Rest Repositories
- REST Docs
- JPA
- JDBC
- MyBatis
- MySQL
- DevTools
- Websocket
generate project 클릭 > 다운받은파일을 적당한 위치에 압축을 풀어주세요
intellij 실행후 압축 푼 폴더를 open 해주세요
mysql 설치
php 도 같이 쓰니까 xampp 설치 https://www.apachefriends.org/download.html
접근 할 database 생성
create database menudb
/src/main/resources/application.properties 파일 수정
server.port= 8090
spring.mvc.view.prefix=/WEB-INF/views/
spring.mvc.view.suffix=.jsp
spring.application.name=Menugame
spring.datasource.url=jdbc:mysql://localhost/menudb?autoReconnect=true&useSSL=false
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
/src/main/resources/application.yml 파일 생성, 수정
spring:
devtools:
livereload:
enabled: true
freemarker:
cache: false # 실서버 에서 올릴때 true 로 변경한다.
끝났으면
play 버튼 눌러서 확인
기본
127.0.0.1
성공