feat: DJErp 어댑터 URL 매핑을 properties 외부화 및 동적 등록으로 변경
- DJErpAdapterMappingRegistrar 신규 추가: ContextRefreshedEvent 시점에 dj.erp.adapter.paths(쉼표 구분)를 읽어 callApi 메서드를 동적으로 등록 OAuth2의 FrameworkEndpointHandlerMapping과 충돌하지 않도록 exact type 비교로 선택 - DJErpApiAdapterController: 하드코딩된 @RequestMapping 제거 (Registrar에 위임) - DJErpApiAdapterService: @Primary 추가 (Root/Servlet Context 중복 스캔 시 충돌 방지) - applicationContext-jpa.xml: Root Context에서 @Controller/@RestController 제외 필터 추가 - authserver-servlet.xml: context:property-placeholder 및 DJErpAdapterMappingRegistrar 빈 선언 추가 - env.D/T/P.properties: dj.erp.adapter.paths 속성 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,12 @@
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd
|
||||
">
|
||||
|
||||
<context:component-scan base-package="com.eactive.eai" />
|
||||
<context:component-scan base-package="com.eactive.eai">
|
||||
<context:exclude-filter type="annotation"
|
||||
expression="org.springframework.stereotype.Controller"/>
|
||||
<context:exclude-filter type="annotation"
|
||||
expression="org.springframework.web.bind.annotation.RestController"/>
|
||||
</context:component-scan>
|
||||
|
||||
<bean id="entityManagerFactory" primary="true"
|
||||
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
http://www.springframework.org/schema/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||
|
||||
<context:property-placeholder
|
||||
location="/WEB-INF/properties/*.${eai.systemmode}.properties"
|
||||
ignore-unresolvable="true" />
|
||||
|
||||
<context:component-scan
|
||||
base-package="com.eactive.eai.authserver" />
|
||||
<context:component-scan
|
||||
@@ -31,4 +35,8 @@
|
||||
<mvc:interceptors>
|
||||
<bean class="com.eactive.eai.adapter.interceptor.HttpResponseLoggingInterceptor"/>
|
||||
</mvc:interceptors>
|
||||
|
||||
<bean class="com.eactive.eai.adapter.controller.DJErpAdapterMappingRegistrar">
|
||||
<property name="paths" value="${dj.erp.adapter.paths}" />
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -20,3 +20,6 @@ eai.systemmode=D
|
||||
eai.systemtype=API
|
||||
eai.tableowner=AGWADM
|
||||
eai.server.extractor=[0,2],[0,2],[-2]
|
||||
|
||||
# DJErp API Adapter request mapping paths (comma-separated)
|
||||
dj.erp.adapter.paths=/dj/{path:^(?!oauth).*$},/dj/{path:^(?!oauth).*$}/**
|
||||
|
||||
@@ -12,3 +12,6 @@ hibernate.dialect=org.hibernate.dialect.Oracle12cDialect
|
||||
eai.systemtype=API
|
||||
eai.server.extractor=[0,2],[0,2],[-2]
|
||||
|
||||
# DJErp API Adapter request mapping paths (comma-separated)
|
||||
dj.erp.adapter.paths=/dj/{path:^(?!oauth).*$},/dj/{path:^(?!oauth).*$}/**
|
||||
|
||||
|
||||
@@ -18,3 +18,6 @@ eai.systemmode=D
|
||||
eai.systemtype=API
|
||||
eai.tableowner=dapigw
|
||||
eai.server.extractor=[0,2],[0,2],[-2]
|
||||
|
||||
# DJErp API Adapter request mapping paths (comma-separated)
|
||||
dj.erp.adapter.paths=/dj/{path:^(?!oauth).*$},/dj/{path:^(?!oauth).*$}/**
|
||||
|
||||
Reference in New Issue
Block a user