build.gradle
// log4j2 ๋ก๊น
๋ผ์ด๋ธ๋ฌ๋ฆฌ
implementation 'org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4.1:1.16'
Java
๋ณต์ฌ
application.properties
spring.application.name=mybatis
# ๋ฐ์ดํฐ ์์ค - MySQL
# log4j2
spring.datasource.driver-class-name=net.sf.log4jdbc.sql.jdbcapi.DriverSpy
spring.datasource.url=jdbc:log4jdbc:mysql://localhost:3306/aloha?serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true&useSSL=false&autoReconnection=true&autoReconnection=true
spring.datasource.username=aloha
spring.datasource.password=123456
# Mybatis ์ค์
# Mybatis ์ค์ ๊ฒฝ๋ก : ~/resources/mybatis-config.xml
# mybatis.config-location=classpath:mybatis-config.xml
# ์ปฌ๋ผ๋ช
์ ๋ณ์๋ช
์ผ๋ก ์๋๋งคํ : board_no โก boardNo
mybatis.configuration.map-underscore-to-camel-case=true
# resultType ์์ฑ์์ dto ๊ฐ์ฒด (ํจํค์ง.ํด๋์ค๋ช
) โก (ํด๋์ค๋ช
)
mybatis.type-aliases-package=com.aloha.mybatis.dto
# Mybatis ๋งคํผ ํ์ผ ๊ฒฝ๋ก : ~/๋ฉ์ธํจํค์ง/mapper/**Mapper.xml
mybatis.mapper-locations=classpath:mybatis/mapper/**/**.xml
# ๋ก๊ทธ ๋ ๋ฒจ ์ค์
logging.level.com.aloha.mybatis=INFO
# ANSI ์ปฌ๋ฌ ์ถ๋ ฅ ์ค์
spring.output.ansi.enabled=ALWAYS
Java
๋ณต์ฌ



