springmvc.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
  6. xmlns:mvc="http://www.springframework.org/schema/mvc"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
  8. http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd
  9. http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd
  10. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
  11. <!-- 加载外部属性文件 -->
  12. <context:property-placeholder location="classpath:resource/resource.properties" />
  13. <context:component-scan base-package="com.itheima.controller" />
  14. <mvc:annotation-driven />
  15. <bean
  16. class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  17. <property name="prefix" value="/WEB-INF/jsp/" />
  18. <property name="suffix" value=".jsp" />
  19. </bean>
  20. <!--&lt;!&ndash; 配置静态资源映射 &ndash;&gt;
  21. &lt;!&ndash; 指定/WEB-INF/js/和/WEB-INF/css/下的所有的静态资源(包括子目录下的静态资源)都不被拦截 &ndash;&gt;
  22. &lt;!&ndash; mapping=/js/**:表示访问静态资源的路径的形式,/js/**表示可以访问/js/下的静态资源或者所有的子目录下的静态资源 &ndash;&gt;
  23. <mvc:resources location="/js/" mapping="/js/**"/>
  24. <mvc:resources location="/css/" mapping="/css/**"/>
  25. <mvc:resources location="/images/" mapping="/images/**"/>
  26. -->
  27. <!-- 引用Dubbo服务 -->
  28. <dubbo:application name="taotao-sso-web"/>
  29. <dubbo:registry protocol="zookeeper" address="192.168.37.161:2181"/>
  30. <dubbo:reference interface="com.itheima.service.UserRegisterService" id="userRegisterService" />
  31. <dubbo:reference interface="com.itheima.service.UserLoginService" id="userLoginService" />
  32. </beans>