을 프로필 : 개발, 테스트, ... 질문은등록 서로 다른 흐름이 서로 다른 봄 프로파일가 내 응용 프로그램에서
, 활성화에 따라 흐름을 등록하는 방법은 무엇입니까 봄 프로필?
예를 들어 flow : aFlow.xml, bFlow.xml이 있습니다. 봄 프로파일 개발이 활성화되면
, 내가 원하는
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
<webflow:flow-location path=".../aFlow.xml" />
</webflow:flow-registry>
봄 프로파일 테스트가 활성화되면, 그때
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
<webflow:flow-location path=".../aFlow.xml" />
<webflow:flow-location path=".../bFlow.xml" />
</webflow:flow-registry>
배경 같은 것을 원하는 같은 : 봄 프로파일 개발 인 경우 bFlow.xml에 액세스 할 수 없습니다. 스프링 프로파일 테스트가 활성화되면 aFlow.xml 및 bFlow.xml에 액세스 할 수 있어야합니다.
현재 다음 해결책이 있습니다. 나는
<webflow:flow-registry id="flowRegistry" flow-builder-services="flowBuilderServices">
<webflow:flow-location path=".../aFlow.xml" />
</webflow:flow-registry>
<webflow:flow-registry id="flowRegistryTest" flow-builder-services="flowBuilderServices" parent="flowRegistry">
<webflow:flow-location path=".../bFlow.xml" />
</webflow:flow-registry>
을 정의하고 봄 프로파일에 따라 다른 FlowHandlerMapping를 사용
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping">
<property name="flowRegistry" ref="flowRegistry"/>
<property name="defaultHandler">
<!-- If no flow match, map path to a view to render; e.g. the "/intro" path would map to the view named
"intro" -->
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
</property>
</bean>
<beans profile="test">
<bean class="org.springframework.webflow.mvc.servlet.FlowHandlerMapping" primary="true">
<property name="flowRegistry" ref="flowRegistryTest"/>
<property name="defaultHandler">
<!-- If no flow match, map path to a view to render; e.g. the "/intro" path would map to the view named
"intro" -->
<bean class="org.springframework.web.servlet.mvc.UrlFilenameViewController"/>
</property>
</bean>
</beans>
사전에 감사!