enum 추가, cors 설정 추가

This commit is contained in:
2025-11-28 11:19:20 +09:00
parent d230b74aa0
commit 7ee3afb8f0
5 changed files with 11 additions and 15 deletions

View File

@@ -9,7 +9,5 @@ import org.springframework.web.bind.annotation.RestController;
public class CommonController { public class CommonController {
@GetMapping("/sheets/{id}") @GetMapping("/sheets/{id}")
public void getSheetList() { public void getSheetList() {}
}
} }

View File

@@ -25,9 +25,9 @@ public enum DetectionClassification {
private final String id; private final String id;
private final String desc; private final String desc;
/** /**
* Optional: Helper method to get the enum from a String, case-insensitive, or return ETC if not found. * Optional: Helper method to get the enum from a String, case-insensitive, or return ETC if not
* found.
*/ */
public static DetectionClassification fromString(String text) { public static DetectionClassification fromString(String text) {
if (text == null || text.trim().isEmpty()) { if (text == null || text.trim().isEmpty()) {

View File

@@ -25,9 +25,9 @@ public enum DetectionClassification {
private final String id; private final String id;
private final String desc; private final String desc;
/** /**
* Optional: Helper method to get the enum from a String, case-insensitive, or return ETC if not found. * Optional: Helper method to get the enum from a String, case-insensitive, or return ETC if not
* found.
*/ */
public static DetectionClassification fromString(String text) { public static DetectionClassification fromString(String text) {
if (text == null || text.trim().isEmpty()) { if (text == null || text.trim().isEmpty()) {

View File

@@ -18,11 +18,12 @@ public class WebConfig implements WebMvcConfigurer {
@Override @Override
public void addCorsMappings(CorsRegistry registry) { public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**") // 모든 URL 허용 registry
.allowedOriginPatterns("*") .addMapping("/**") // 모든 URL 허용
.allowedMethods("*") .allowedOriginPatterns("*")
.allowedHeaders("*") .allowedMethods("*")
.allowCredentials(true); .allowedHeaders("*")
.allowCredentials(true);
} }
@Bean @Bean

View File

@@ -14,7 +14,6 @@ import org.locationtech.jts.geom.Geometry;
@Table(name = "tb_map_sheet_anal_data_geom") @Table(name = "tb_map_sheet_anal_data_geom")
public class MapSheetAnalDataGeomEntity { public class MapSheetAnalDataGeomEntity {
@Id @Id
@GeneratedValue( @GeneratedValue(
strategy = GenerationType.SEQUENCE, strategy = GenerationType.SEQUENCE,
@@ -116,6 +115,4 @@ public class MapSheetAnalDataGeomEntity {
@Column(name = "geom_center", columnDefinition = "geometry") @Column(name = "geom_center", columnDefinition = "geometry")
private Geometry geomCenter; private Geometry geomCenter;
} }