-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
181 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: org.springframework.boot.loader.JarLauncher | ||
Start-Class: com.example.UserService.UserServiceApplication | ||
Spring-Boot-Version: 3.1.3 | ||
Spring-Boot-Classes: BOOT-INF/classes/ | ||
Spring-Boot-Lib: BOOT-INF/lib/ | ||
Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx | ||
Spring-Boot-Layers-Index: BOOT-INF/layers.idx | ||
Build-Jdk-Spec: 17 | ||
Implementation-Title: UserService | ||
Implementation-Version: 0.0.1-SNAPSHOT | ||
|
Binary file not shown.
33 changes: 33 additions & 0 deletions
33
src/main/java/com/example/UserService/config/JasyptConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.example.UserService.config; | ||
|
||
import org.jasypt.encryption.StringEncryptor; | ||
import org.jasypt.encryption.pbe.PooledPBEStringEncryptor; | ||
import org.jasypt.encryption.pbe.config.SimpleStringPBEConfig; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@Configuration | ||
public class JasyptConfig { | ||
|
||
@Value("${jasypt.encryptor.password}") | ||
private String encryptKey; | ||
|
||
@Bean("jasyptStringEncryptor") | ||
public StringEncryptor stringEncryptor() { | ||
|
||
PooledPBEStringEncryptor encryptor = new PooledPBEStringEncryptor(); | ||
SimpleStringPBEConfig config = new SimpleStringPBEConfig(); | ||
|
||
config.setPassword(encryptKey); // encrypt key | ||
config.setAlgorithm("PBEWithMD5AndDES"); // 암호화 알고리즘 | ||
config.setKeyObtentionIterations("1000"); // 반복할 해싱 회수 | ||
config.setPoolSize("1"); // 인스턴스 pool | ||
config.setProviderName("SunJCE"); | ||
config.setSaltGeneratorClassName("org.jasypt.salt.RandomSaltGenerator"); // salt 생성 클래스 | ||
config.setStringOutputType("base64"); //인코딩 방식 | ||
encryptor.setConfig(config); | ||
return encryptor; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
server: | ||
port: 8081 | ||
|
||
spring: | ||
config: | ||
activate: | ||
on-profile: local | ||
|
||
application: | ||
name: User-Service | ||
|
||
data: | ||
redis: | ||
host: localhost | ||
port: 6379 | ||
|
||
jpa: | ||
database: postgresql | ||
hibernate: | ||
dialect: org.hibernate.dialect.PostgresSQLDialect | ||
hibernate.ddl-auto: create | ||
show-sql: true | ||
properties: | ||
hibernate.format_sql: true | ||
|
||
datasource: | ||
hikari: | ||
maximum-pool-size: 4 | ||
url: jdbc:postgresql://localhost:5432/ice_users | ||
username: postgres | ||
password: test12 | ||
driver-class-name: org.postgresql.Driver | ||
|
||
mail: | ||
host: smtp.gmail.com | ||
port: 587 | ||
username: ENC(I+PDk31WFTOU39AypeTrZFVbb8MSpV9oL9q2C3HGQD8/1+Wj7fVmMw==) | ||
password: ENC(TRk22TqlQbz1iTprwMnpiEMZLFAarFDjMf/iTDTnDCw=) | ||
properties: | ||
mail: | ||
smtp: | ||
auth: true | ||
starttls: | ||
enable: true | ||
required: true | ||
connection-timeout: 5000 | ||
timeout: 5000 | ||
write timeout: 5000 | ||
auth-code-expiration-millis: 1800000 # 30분 | ||
|
||
eureka: | ||
instance: | ||
instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} | ||
client: | ||
register-with-eureka: true | ||
fetch-registry: true | ||
service-url: | ||
defaultZone: http://localhost:8761/eureka | ||
|
||
greeting: | ||
message: Welcome to the Ice-Americano Page | ||
|
||
secretKey: amazing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
server: | ||
port: 8081 | ||
|
||
spring: | ||
config: | ||
activate: | ||
on-profile: prod | ||
|
||
data: | ||
redis: | ||
host: localhost | ||
port: 6379 | ||
|
||
application: | ||
name: User-Service | ||
|
||
datasource: | ||
driver-class-name: com.mysql.cj.jdbc.Driver | ||
url: ENC(IiuEBphb1S9PmnqVHOLwRbRwEo1POJmm42W7J/XS3s7Eeh02Kt7VVi62X8v2+JZYYSNNuy2n8B+UYKLkxMBeDzQ/4t4PuorJtR2W8EKHWXdkUgZc+ppIztrCLhxqQ0ohm/oNkMlNiBy+ZC6bsQe3UE/g1SVsKHFvh+ndsQoD/+PlyljVCs6eog==) | ||
username: ENC(R9ELUhikhPOj9EworsW/Nw==) | ||
password: ENC(JPbOCKIfxPLVNTSoWB7TYrmLrB0Pup/c) | ||
|
||
jpa: | ||
show-sql: true | ||
hibernate: | ||
ddl-auto: update | ||
properties: | ||
hibernate: | ||
format_sql: true | ||
|
||
mail: | ||
host: smtp.gmail.com | ||
port: 587 | ||
username: ENC(I+PDk31WFTOU39AypeTrZFVbb8MSpV9oL9q2C3HGQD8/1+Wj7fVmMw==) | ||
password: ENC(TRk22TqlQbz1iTprwMnpiEMZLFAarFDjMf/iTDTnDCw=) | ||
properties: | ||
mail: | ||
smtp: | ||
auth: true | ||
starttls: | ||
enable: true | ||
required: true | ||
connection-timeout: 5000 | ||
timeout: 5000 | ||
write timeout: 5000 | ||
auth-code-expiration-millis: 1800000 # 30분 | ||
|
||
eureka: | ||
instance: | ||
instance-id: ${spring.application.name}:${spring.application.instance_id:${random.value}} | ||
client: | ||
register-with-eureka: true | ||
fetch-registry: true | ||
service-url: | ||
defaultZone: http://52.78.155.253:8761/eureka | ||
|
||
greeting: | ||
message: Welcome to the Ice-Americano Page | ||
|
||
secretKey: amazing |