我有两个Spring MVC项目。我想将 Project b 合并到 Project a 中。
投射的调度程序servlet配置:
int percentComplete = (int)Math.Round(((double)obj.BytesSent) / totalBytes * 100);
stringProgressReport[3] = percentComplete.ToString();
项目b 的调度程序servlet配置:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd">
<context:component-scan base-package="com.mkyong.web" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/views/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
<mvc:resources mapping="/resources/**" location="/resources/" />
<mvc:annotation-driven />
</beans>
现在我想将 Project B 合并到 Project a 中。
我的问题是URL映射。我想将...
<bean id="webDispatcherMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"
lazy-init="true">
<property name="alwaysUseFullPath" value="true" />
<property name="mappings">
<props>
<prop key="/web">#{webDispatcherMappingSystem}</prop>
<prop key="/web/**">#{webDispatcherMappingSystem}</prop>
<prop key="/web/resources/**">#{webDispatcherMappingSystem}</prop>
</props>
</property>
</bean>
...
映射到项目a ,并将/
映射到项目b 。
我想将这两个映射合并到 Project a 的调度程序servlet配置中。
我该怎么办?没有人可以帮助我吗?