Development/Springboot
[Springboot] Instagram clone (2)프론트 소스와 yml
Juyeong
2022. 7. 2. 11:59
1. js, css, html 프론트 소스 틀을 import (백엔드 구현에 중점을 뒀기 때문에 프론트는 임포트 합니다.)
2. 오류: hibernate 빈을 못 불러 옴
msg:
error creating bean with name 'entitymanagerfactory' defined in class path
해결: yml 의 datasource 변경 (DB username, password 및 정보는 모두 지웠습니다:) )
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/snsgram?serverTimezone=Asia/Seoul
username: //
password: //
배운 점:
- 오류를 밑에서부터 보는 것도 좋지만, 위까지 꼼꼼히 보자.
- 근본은 아래이고 가장 베이직한 것은 위에 있다. → 위치의 차이일 뿐 꼼꼼히 봐야하는 것은 같다.
- 내 db 수정이 아니라 application.yml을 수정함. 쏘 간단~🙂
3. yml 파일의 이해
server:
port: 8080
servlet:
context-path: /
encoding:
charset: utf-8
enabled: true
spring:
mvc:
view:
prefix: /WEB-INF/views/
suffix: .jsp
datasource:
driver-class-name: org.mariadb.jdbc.Driver
url: jdbc:mariadb://localhost:3306/snsgram?serverTimezone=Asia/Seoul
username: //
password: //
jpa:
open-in-view: true
hibernate:
ddl-auto: create
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
show-sql: true
servlet:
multipart:
enabled: true
max-file-size: 2MB
security:
user:
name: test
password: 1234
file:
path: C:/workspace/springbootwork/upload/