
application.yml
server:
address : localhost
port : 8080
# MySQL 연동
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/shootformoney
username: root
password: aA!123456
jpa:
hibernate:
ddl-auto: create
properties:
hibernate:
format_sql: true
show_sql: true
database: mysql
show_sql: true
# thymeleaf 설정
thymeleaf:
check-template-location: true
prefix: classpath:/templates/
suffix: .html
cache: false
mvc:
static-path-pattern: /static/**
# mail 설정
mail:
host: smtp.gmail.com
port: 587
username: crazymin180@gmail.com
password: zumb zjje zocn cdmb
properties:
mail:
smtp:
auth: true
starttls:
enable: true
custom:
siteName: shootformoney
siteMainUri: http://localhost:8080
emailFrom: test@localhost
emailFromName: admin
logging.level:
org.hibernate.SQL: debug
# football-data.org API 연동
football:
api:
key:
base-url: https://api.football-data.org/v4
위와 같이 base-url에서 키를 받아 api의 key: 부분에 넣어주면 연동이 가능하다.
ddl-auto는 처음에만 create로 데이터베이스를 생성해주고 이후로는 update로 진행하였다.