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 | 29 | 30 | 31 |
Tags
- JPA
- 백준
- Union Find
- DFS
- SWEA
- Java
- 완탐
- 코딩테스트
- database
- DP
- SSAFY
- 다익스트라
- 유니온파인드
- 코드트리
- 다시보기
- 알고리즘
- 부분수열의합2
- 완전탐색
- Spring
- 알고리즘기본개념
- 트러블슈팅
- 자바
- 싸피
- 그리디
- 기본유형
- 코딩테스트실력진단
- BFS
- 그래프
- 코테
- JUnit
Archives
- Today
- Total
HwangHub
[Junit] 토이 프로젝트 for JUnit practice : Bank App 1 - 환경 설정 본문
DEV-STUDY/Spring
[Junit] 토이 프로젝트 for JUnit practice : Bank App 1 - 환경 설정
HwangJerry 2023. 7. 27. 11:30프로젝트 시작하기
기본 의존성 추가 (스프링부트3 + 자바17 사용)
maven repository에 접속해서 jwt 의존성 추가 (작성일 기준 최신 버전)
프로파일 설정
## 개발환경 기본 세팅
server:
port: 8081
servlet:
encoding:
charset: UTF-8
force: true
spring:
config:
activate:
on-profile: dev # 프로파일 설정
datasource:
url: jdbc:h2:mem:test;MODE=MySQL
driver-class-name: org.h2.Driver
username: sa
password:
h2:
console:
enabled: true
jpa:
open-in-view: false
hibernate:
ddl-auto: create
properties:
hibernate:
default_batch_fetch_size: 100
format_sql: true
show-sql: true
output:
ansi:
enabled: always
logging:
level:
'[study.junit.bank]':DEBUG
## 배포환경 기본 세팅
server:
port: 5000
servlet:
encoding:
charset: UTF-8
force: true
spring:
config:
activate:
on-profile: prod # 프로파일 설정
datasource:
url: jdbc:mariadb://${rds.hostname}:${rds.port}/${rds.db.name}
driver-class-name: org.mariadb.jdbc.Driver
username: ${rds.username}
password: ${rds.password}
jpa:
open-in-view: false
hibernate:
ddl-auto: none
properties:
hibernate:
default_batch_fetch_size: 100
logging:
level:
'[study.junit.bank]':INFO
## 테스트 환경 기본 세팅
server:
port: 8080
servlet:
encoding:
charset: UTF-8
force: true
spring:
config:
activate:
on-profile: test # 프로파일 설정
datasource:
url: jdbc:h2:mem:test;MODE=MySQL
driver-class-name: org.h2.Driver
username: sa
password:
h2:
console:
enabled: true
jpa:
open-in-view: false
hibernate:
ddl-auto: create
properties:
hibernate:
default_batch_fetch_size: 100
format_sql: true
show-sql: true
output:
ansi:
enabled: always
logging:
level:
'[study.junit.bank]': DEBUG
'[study.junit.bank]': TRACE
참고:
'DEV-STUDY > Spring' 카테고리의 다른 글
[Spring] @Bean과 @Configuration, @Component (0) | 2023.07.28 |
---|---|
[JUnit] 토이 프로젝트 for JUnit practice : Bank App 2 - SecurityConfig (0) | 2023.07.27 |
[JUnit] MockMVC로 Controller 테스트하기 (0) | 2023.07.26 |
[Spring] entity field에 wrapper class를 사용하는 이유 (0) | 2023.07.20 |
[Spring] profiles 설정 (spring boot 2.4 버전 이후) (0) | 2023.07.20 |
Comments