devide profiles
This commit is contained in:
16
prd/src/main/java/site/ocr/prd/WebConfig.java
Normal file
16
prd/src/main/java/site/ocr/prd/WebConfig.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package site.ocr.prd;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("http://localhost:3000")
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||
.allowCredentials(true);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ public class LoginController {
|
||||
@PostMapping("login/oauth-kakao")
|
||||
public String postMethodName(@RequestBody String entity) {
|
||||
//TODO: process POST request
|
||||
|
||||
System.out.println(entity);
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
7
prd/src/main/resources/application-dev.yml
Normal file
7
prd/src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
spring:
|
||||
profiles: DEV
|
||||
server:
|
||||
port: 9001
|
||||
logging:
|
||||
level:
|
||||
root: debug
|
||||
7
prd/src/main/resources/application-prod.yml
Normal file
7
prd/src/main/resources/application-prod.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
spring:
|
||||
profiles: PROD
|
||||
server:
|
||||
port: 9000
|
||||
logging:
|
||||
level:
|
||||
root: WARN
|
||||
@@ -1,27 +1,6 @@
|
||||
#로컬 실행시 기본 프로필
|
||||
spring:
|
||||
profiles:
|
||||
active:
|
||||
- dev
|
||||
---
|
||||
#공통 설정
|
||||
|
||||
---
|
||||
#프로필 별 설정 DEV
|
||||
spring:
|
||||
profiles: DEV
|
||||
server:
|
||||
port: 9001
|
||||
logging:
|
||||
level:
|
||||
root: debug
|
||||
|
||||
---
|
||||
#프로필 별 설정 PROD
|
||||
spring:
|
||||
profiles: PROD
|
||||
server:
|
||||
port: 9000
|
||||
logging:
|
||||
level:
|
||||
root: WARN
|
||||
config:
|
||||
activate:
|
||||
on-profile:
|
||||
- DEV
|
||||
|
||||
Reference in New Issue
Block a user