File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
src/main/java/wooteco/subway Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change
1
+ package wooteco .subway ;
2
+
3
+ import org .springframework .context .annotation .Configuration ;
4
+ import org .springframework .web .servlet .config .annotation .CorsRegistry ;
5
+ import org .springframework .web .servlet .config .annotation .WebMvcConfigurer ;
6
+
7
+ @ Configuration
8
+ public class WebConfig implements WebMvcConfigurer {
9
+ @ Override
10
+ public void addCorsMappings (CorsRegistry registry ) {
11
+ registry .addMapping ("/**" ).allowedMethods ("*" ).allowedOriginPatterns ("*" );
12
+ }
13
+ }
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public ResponseEntity<List<StationResponse>> showStations() {
33
33
}
34
34
35
35
@ DeleteMapping ("/stations/{id}" )
36
- public ResponseEntity deleteStation (@ PathVariable Long id ) {
36
+ public ResponseEntity < Void > deleteStation (@ PathVariable Long id ) {
37
37
return ResponseEntity .noContent ().build ();
38
38
}
39
39
}
You can’t perform that action at this time.
0 commit comments