Fix : 수정
This commit is contained in:
parent
96ceed3d5d
commit
d35ce80e58
@ -5,6 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||||
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
@ -16,18 +17,17 @@ import org.springframework.web.client.RestTemplate;
|
|||||||
* @author 하이오더 개발팀
|
* @author 하이오더 개발팀
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication(scanBasePackages = {
|
@SpringBootApplication
|
||||||
|
@ComponentScan(basePackages = {
|
||||||
"com.ktds.hi.store",
|
"com.ktds.hi.store",
|
||||||
"com.ktds.hi.common"
|
"com.ktds.hi.common",
|
||||||
})
|
"com.ktds.hi.common.audit" // 👈 audit 패키지 명시적 추가
|
||||||
@EnableJpaRepositories(basePackages = {
|
|
||||||
"com.ktds.hi.store.infra.gateway.repository", // 👈 MenuJpaRepository 패키지
|
|
||||||
"com.ktds.hi.common.repository"
|
|
||||||
})
|
})
|
||||||
@EntityScan(basePackages = {
|
@EntityScan(basePackages = {
|
||||||
"com.ktds.hi.store.infra.gateway.entity",
|
"com.ktds.hi.store.infra.gateway.entity",
|
||||||
"com.ktds.hi.common.entity"
|
"com.ktds.hi.common.entity"
|
||||||
})
|
})
|
||||||
|
@EnableJpaRepositories(basePackages = {"com.ktds.hi.store.infra.gateway.repository"})
|
||||||
@EnableJpaAuditing(auditorAwareRef = "customAuditorAware")
|
@EnableJpaAuditing(auditorAwareRef = "customAuditorAware")
|
||||||
public class StoreApplication {
|
public class StoreApplication {
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,43 @@
|
|||||||
|
package com.ktds.hi.store.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||||
|
import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer;
|
||||||
|
import org.springframework.security.config.http.SessionCreationPolicy;
|
||||||
|
import org.springframework.security.web.SecurityFilterChain;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Analytics 서비스 보안 설정 클래스
|
||||||
|
* 테스트를 위해 모든 엔드포인트를 인증 없이 접근 가능하도록 설정
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableWebSecurity
|
||||||
|
public class SecurityConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
|
||||||
|
http
|
||||||
|
.csrf(AbstractHttpConfigurer::disable)
|
||||||
|
.sessionManagement(session -> session.sessionCreationPolicy(SessionCreationPolicy.STATELESS))
|
||||||
|
.authorizeHttpRequests(auth -> auth
|
||||||
|
// Swagger 관련 경로 모두 허용
|
||||||
|
.requestMatchers("/swagger-ui.html","/swagger-ui/**", "/swagger-ui.html").permitAll()
|
||||||
|
.requestMatchers("/api-docs/**", "/v3/api-docs/**").permitAll()
|
||||||
|
.requestMatchers("/swagger-resources/**", "/webjars/**").permitAll()
|
||||||
|
|
||||||
|
// Analytics API 모두 허용 (테스트용)
|
||||||
|
.requestMatchers("/api/analytics/**").permitAll()
|
||||||
|
.requestMatchers("/api/action-plans/**").permitAll()
|
||||||
|
|
||||||
|
// Actuator 엔드포인트 허용
|
||||||
|
.requestMatchers("/actuator/**").permitAll()
|
||||||
|
|
||||||
|
// 기타 모든 요청 허용 (테스트용)
|
||||||
|
.anyRequest().permitAll()
|
||||||
|
);
|
||||||
|
|
||||||
|
return http.build();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -40,10 +40,10 @@ public class StoreEntity {
|
|||||||
@Column(nullable = false, length = 300)
|
@Column(nullable = false, length = 300)
|
||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@Column(precision = 10, scale = 8)
|
@Column
|
||||||
private Double latitude;
|
private Double latitude;
|
||||||
|
|
||||||
@Column(precision = 11, scale = 8)
|
@Column
|
||||||
private Double longitude;
|
private Double longitude;
|
||||||
|
|
||||||
@Column(length = 500)
|
@Column(length = 500)
|
||||||
@ -65,7 +65,7 @@ public class StoreEntity {
|
|||||||
@Builder.Default
|
@Builder.Default
|
||||||
private String status = "INACTIVE";
|
private String status = "INACTIVE";
|
||||||
|
|
||||||
@Column(precision = 3, scale = 2)
|
@Column
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
private Double rating = 0.0;
|
private Double rating = 0.0;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user