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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user