1. MySQL에서 jwt database 만들기
2. mvnrepository에서 java jwt 가져오기
<!-- https://mvnrepository.com/artifact/com.auth0/java-jwt -->
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.18.2</version>
</dependency>
3. application.yml 작성
server:
port: 8080
servlet:
context-path: /
encoding:
charset: UTF-8
enabled: true
force: true
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/jwt?serverTimezone=Asia/Seoul
username: pure
password: pure1234
jpa:
hibernate:
ddl-auto: create #create update none
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
show-sql: true
'취업 준비 > Spring security' 카테고리의 다른 글
14. JWT를 사용할 때의 security 설정 (0) | 2022.02.25 |
---|---|
12. JWT가 왜 필요한가? (0) | 2022.02.24 |
11. 보안 문제와 RSA (0) | 2022.02.24 |
10. TCP는 무엇인가? (0) | 2022.02.24 |
9. 네이버 OAuth 로그인 (0) | 2022.02.24 |