사용 버전
Spring Boot : 2.7.16
MyBatis : 2.3.1
MySql : 8.0.34
종속성 추가

기본은 application.properties 지만 .yml이 관리가 편하고 key를 중복으로 사용하지 않아도 되서 사용합니다.
1) MySql 설정
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://데이터베이스주소:3306/데이터베이스명?serverTimezone=UTC&characterEncoding=UTF-8
username: 데이터베이스 아이디
password: 데이터베이스 비밀번호
2) MyBatis 설정
mybatis:
mapper-locations: classpath:mapper/**/*Mapper.xml
configuration:
map-underscore-to-camel-case: true
type-aliases-package: com.dev.shop