- postgresql => mysql
- maven => gradle
./gradlew build
java -jar build/libs/demo-0.0.1-SNAPSHOT.jar
Mysql 컨테이너 생성 및 실행(백그라운드)
docker run --name rest-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=pass -d mysql:8.0.28
docker exec -i -t rest-mysql bash
root/# mysql -uroot -ppass
mysql> create schema restdb;
spring.jackson.deserialization.fail-on-unknown-properties=true
spring.datasource.username=root
spring.datasource.password=pass
spring.datasource.url=jdbc:mysql://localhost:3306/restdb
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
spring.jpa.properties.hibernate.format_sql=true
logging.level.org.hibernate.SQL=DEBUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE
application-test.properties
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driver-class-name=org.h2.Driver
spring.datasource.hikari.jdbc-url=jdbc:h2:mem:testdb
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect