Compare commits

...

6 Commits

Author SHA1 Message Date
손창현
d54b88aa28 fix: 맨 하단 개행 2022-05-03 01:06:33 +09:00
손창현
7e31cea721 fix: gitignore .idea xml, iml 추가 2022-05-03 01:02:24 +09:00
손창현
fecd48a160 deldeted .idea/ 2022-05-03 00:57:14 +09:00
손창현
55cbab0a58 fix: .gitignore .idea/ 변경 2022-05-03 00:56:12 +09:00
손창현
e4003972fe chore: jasypt bean - jasyptStringEncryptor 2022-05-03 00:38:34 +09:00
손창현
cf9f5aa87f add: JasyptConfig 2022-05-03 00:32:48 +09:00
5 changed files with 37 additions and 3 deletions

4
server/.gitignore vendored
View File

@@ -86,7 +86,9 @@ fabric.properties
# Ignore everything but code style settings and run configurations
# that are supposed to be shared within teams.
.idea/*
.idea/
.idea/*.iml
.idea/*.xml
!.idea/codeStyles
!.idea/runConfigurations

View File

@@ -29,6 +29,8 @@ dependencies {
implementation ("org.springframework.boot:spring-boot-starter-validation")
implementation ("org.springframework.boot:spring-boot-starter-web")
implementation ("com.github.ulisesbocchio:jasypt-spring-boot-starter:3.0.4")
compileOnly ("org.projectlombok:lombok")
runtimeOnly ("mysql:mysql-connector-java")
annotationProcessor ("org.projectlombok:lombok")

View File

@@ -0,0 +1,26 @@
package com.ticketing.server.global.config;
import org.jasypt.encryption.StringEncryptor;
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor;
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class JasyptConfig {
@Bean("jasyptStringEncryptor")
public StringEncryptor stringEncryptor() {
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor();
SimpleStringPBEConfig config = new SimpleStringPBEConfig();
config.setPassword("ticketing");
config.setAlgorithm("PBEWithMD5AndDES");
config.setKeyObtentionIterations("1000");
config.setPoolSize("1");
config.setProviderName("SunJCE");
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator");
config.setStringOutputType("base64");
encryptor.setConfig(config);
return encryptor;
}
}

View File

@@ -1,8 +1,8 @@
spring:
datasource:
url: jdbc:mysql://localhost:3306/ticketing?serverTimezone=Asia/Seoul&characterEncoding=UTF-8
username: ticketing
password: ticketing
username: ENC(LowN1n4w0Ep/DqLD8+q5Bq6AXM4b8e3V)
password: ENC(OMvGcpZLpggFTiGNkqNe66Zq/SmJXF6o)
driver-class-name: com.mysql.cj.jdbc.Driver
jpa:

View File

@@ -25,3 +25,7 @@ spring:
cacheServerConfiguration: true
elideSetAutoCommits: true
maintainTimeStats: false
jasypt:
encryptor:
bean: jasyptStringEncryptor