mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
45 lines
1.8 KiB
XML
45 lines
1.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xmlns:context="http://www.springframework.org/schema/context"
|
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
http://www.springframework.org/schema/context
|
|
http://www.springframework.org/schema/context/spring-context.xsd
|
|
http://www.springframework.org/schema/mvc
|
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
|
|
|
<!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->
|
|
|
|
<bean class="com.gitee.app.config.MyPropertySourcesPlaceholderConfigurer">
|
|
<property name="locations">
|
|
<list>
|
|
<value>classpath:application.properties</value>
|
|
</list>
|
|
</property>
|
|
</bean>
|
|
|
|
<!-- 只扫描Controller类 -->
|
|
<context:component-scan base-package="com.gitee.app" use-default-filters="false">
|
|
<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
|
|
</context:component-scan>
|
|
|
|
<!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->
|
|
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
|
<property name="prefix" value="/WEB-INF/views/" />
|
|
<property name="suffix" value=".jsp" />
|
|
</bean>
|
|
|
|
<mvc:annotation-driven />
|
|
|
|
<bean class="com.gitee.app.config.OpenServiceConfig"/>
|
|
|
|
<!-- swagger2 配置 -->
|
|
<mvc:resources location="classpath:/META-INF/resources/" mapping="doc.html"/>
|
|
<mvc:resources location="classpath:/META-INF/resources/webjars/" mapping="/webjars/**"/>
|
|
<bean class="com.gitee.app.config.Swagger2"/>
|
|
<!-- 接入SOP配置 end -->
|
|
|
|
</beans>
|