devide profiles

This commit is contained in:
2025-07-16 23:33:21 +09:00
parent ba642f9e9f
commit 467508820f
5 changed files with 35 additions and 26 deletions

View 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);
}
}

View File

@@ -11,7 +11,7 @@ public class LoginController {
@PostMapping("login/oauth-kakao") @PostMapping("login/oauth-kakao")
public String postMethodName(@RequestBody String entity) { public String postMethodName(@RequestBody String entity) {
//TODO: process POST request //TODO: process POST request
System.out.println(entity);
return entity; return entity;
} }

View File

@@ -0,0 +1,7 @@
spring:
profiles: DEV
server:
port: 9001
logging:
level:
root: debug

View File

@@ -0,0 +1,7 @@
spring:
profiles: PROD
server:
port: 9000
logging:
level:
root: WARN

View File

@@ -1,27 +1,6 @@
#로컬 실행시 기본 프로필 #로컬 실행시 기본 프로필
spring: spring:
profiles: config:
active: activate:
- dev on-profile:
--- - DEV
#공통 설정
---
#프로필 별 설정 DEV
spring:
profiles: DEV
server:
port: 9001
logging:
level:
root: debug
---
#프로필 별 설정 PROD
spring:
profiles: PROD
server:
port: 9000
logging:
level:
root: WARN