From e7b699e66fe9898b56369bf40bec6f0312450901 Mon Sep 17 00:00:00 2001 From: gyulchyoung Date: Tue, 20 Sep 2022 21:06:07 +0900 Subject: [PATCH] =?UTF-8?q?[Chore]=20yaml=ED=8C=8C=EC=9D=BC=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../comm/config/SwaggerConfig.java | 4 ++-- .../tourApiProject/user/RSAService.java | 2 +- src/main/resources/application.properties | 23 ------------------- src/main/resources/application.yml | 23 +++++++++++++++---- 4 files changed, 22 insertions(+), 30 deletions(-) delete mode 100644 src/main/resources/application.properties diff --git a/src/main/java/com/server/tourApiProject/comm/config/SwaggerConfig.java b/src/main/java/com/server/tourApiProject/comm/config/SwaggerConfig.java index 7d708c9..59b5f6f 100644 --- a/src/main/java/com/server/tourApiProject/comm/config/SwaggerConfig.java +++ b/src/main/java/com/server/tourApiProject/comm/config/SwaggerConfig.java @@ -16,8 +16,8 @@ public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2).select() - .apis(RequestHandlerSelectors.basePackage("com.server.tourApiProject.v1")) - .paths(PathSelectors.any()) + .apis(RequestHandlerSelectors.basePackage("com.server.tourApiProject")) + .paths(PathSelectors.ant("/v1/**")) .build() .useDefaultResponseMessages(false); } diff --git a/src/main/java/com/server/tourApiProject/user/RSAService.java b/src/main/java/com/server/tourApiProject/user/RSAService.java index 08bbb83..0d621db 100644 --- a/src/main/java/com/server/tourApiProject/user/RSAService.java +++ b/src/main/java/com/server/tourApiProject/user/RSAService.java @@ -30,7 +30,7 @@ public class RSAService { private final String PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4veKCtvjMbdACgTDS0EXveDgVHSndOkJWj6Qt1Bq6g4z8SVFraQ0LADFeosvaaasZgVs2ny5cLmAG1HmiHvU4HJrcsPb4jxUEm+VUJCNHxb6G4BQ11sJlZn3hyphfWApaSzKodzoTz0qgR4XMkoZYqgyxP7wABuDPLQLTnr44PQIDAQAB"; - @Value("${rsa.private-key}") +// @Value("${rsa.private-key}") private String PRIVATE_KEY; public String getPRIVATE_KEY(){ diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties deleted file mode 100644 index 93293ff..0000000 --- a/src/main/resources/application.properties +++ /dev/null @@ -1,23 +0,0 @@ -#spring.datasource.url=jdbc:h2:tcp://localhost/~/tourApiProject -#spring.datasource.driver-class-name=org.h2.Driver -#spring.datasource.username=sa -spring.jpa.show-sql=false -spring.jpa.hibernate.ddl-auto=update -spring.sql.init.mode=always -spring.servlet.multipart.maxFileSize=100MB -spring.servlet.multipart.maxRequestSize=100MB -httpconnpool.socket-timeout=5000 - -#spring.pid.file=/Server/boot.pid -spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -spring.datasource.url=jdbc:mysql://starry-night.csv2gdzb0f5o.ap-northeast-2.rds.amazonaws.com:3306/starrynight?serverTimezone=UTC&characterEncoding=UTF-8&allowPublicKeyRetrieval=true&useSSL=false -spring.datasource.username=root -spring.datasource.password=tour0000 - -#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -#spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&characterEncoding=UTF-8 -#spring.datasource.username=root -#spring.datasource.password=0000 -#spring.jpa.hibernate.ddl-auto=create -#spring.jpa.show-sql=true -#spring.sql.init.mode=always diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6fa69d4..f1b5b5b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,8 +1,8 @@ spring: profiles: group: - "local": "localdb,common,localLog" - "prod": "proddb,common,prodLog" + "local": "localdb,common,localLog,security" + "prod": "proddb,common,prodLog,security" --- spring: #prod DB?? @@ -51,7 +51,7 @@ server: connection-timeout: 5000 --- -spring: +spring: #local로깅 config: activate: on-profile: "localLog" @@ -64,7 +64,7 @@ logging: max-history: 7 total-size-cap: 10MB --- -spring: +spring: #prod로깅 config: activate: on-profile: "prodLog" @@ -76,3 +76,18 @@ logging: rollingpolicy: max-history: 60 total-size-cap: 3GB + +--- +spring: #사용자보안 + config: + activate: + on-profile: "security" + mail: + host: smtp.gmail.com + port: '587' + username: starsufers@gmail.com + password: gphtiblybikncidz + properties.mail.smtp: + auth: true + starttls.enable: true +