Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 유니티Material
- springboot 게시판만들기
- spring jpa 게시판
- 유니티
- 유니티기초
- python 괄호 회전하기
- 유니티Cube
- 스프링부트 게시판만들기
- springboot 게시판
- typescript 기초문법
- 스프링부트 미니프로젝트
- 프로그래머스 괄호 회전하기 python
- 파이썬 괄호 회전하기
- 타입스크립트 기본문법
- 스프링부트 블로그
- springboot 미니프로젝트
- 스프링부트 회원가입
- springboot 사이드프로젝트
- 타입스크립트 기초문법
- 스프링 게시판 만들기
- 파이썬 기초
- springboot 게시판 프로젝트
- spring jpa 사이드프로젝트
- 스프링부트 블로그만들기
- jpa 게시판
- 스프링게시판프로젝트
- JS기초
- 타입스크립트 기초
- 괄호 회전하기 파이썬
- 스프링부트 update
Archives
- Today
- Total
Digking's cave
SpringBoot 게시판 만들기 프로젝트 (2) - 개발환경 세팅 / SpringBoot 프로젝트 생성 / application.yml 설정하기 본문
Spring/SpringBoot 게시판 프로젝트
SpringBoot 게시판 만들기 프로젝트 (2) - 개발환경 세팅 / SpringBoot 프로젝트 생성 / application.yml 설정하기
디깅 2023. 7. 10. 15:54728x90
안녕하세요.
오늘은 게시판 만들기에 앞서 프로젝트 개발환경 설정을 진행합니다.
해당 내용은 유튜브 코딩레시피 강사님의 유튜브 강의를 수강 후 개인적으로 요약정리 하였습니다.
해당 프로젝트의 개발환경은 아래와 같습니다.
개발환경
1. IDE: IntelliJ IDEA Community
2. Spring Boot 2.6.13
3. JDK 11
4. mysql
5. Spring Data JPA
6. Thymeleaf
1. 프로젝트 생성
https://start.spring.io/ 에서 해당 환경에 맞는 spring 프로젝트를 생성한다.
Dependencies 에
- Spring Web
- Lombok
- Thymeleaf
를 추가 후 Generate 를 누른다.
2. 다운 받아진 프로젝트를 intelliJ에서 열어준다.
build.gradle
plugins {
id 'java'
id 'org.springframework.boot' version '2.6.13'
id 'io.spring.dependency-management' version '1.1.0'
}
group = 'com.testboard'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '11'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
tasks.named('test') {
useJUnitPlatform()
}
3. application.yml 세팅
기존에 application.properties 를 삭제 후 , application.yml 에 작성한다.
application.yml
# 서버 포트 설정
server:
port: 8082
# database 연동 설정
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/db_codingrecipe?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: user_codingrecipe
password: 1234
thymeleaf:
cache: false
# spring data jpa 설정
jpa:
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
open-in-view: false
show-sql: true
hibernate:
ddl-auto: update
설치 된 DB값으로 설정값을 맞춰준다.
반응형
'Spring > SpringBoot 게시판 프로젝트' 카테고리의 다른 글
SpringBoot 게시판 만들기 프로젝트 (3) - 게시글 작성 후 DB에 게시글 등록하기 (0) | 2023.07.17 |
---|---|
SpringBoot 게시판 만들기 프로젝트 (1) - SpringBoot / JPA / MySQL (0) | 2023.07.10 |