12345678910111213141516171819202122232425262728293031323334353637 |
- <?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: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/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="datasource" />
- <property name="mapperLocations" value="classpath*:mybatis/*.xml" />
- <property name="configurationProperties">
- <props>
- <prop key="cacheEnabled">false</prop>
- </props>
- </property>
- <property name="plugins">
- <array>
- <bean class="com.github.pagehelper.PageInterceptor">
- <property name="properties">
- <value>helperDialect=mysql</value>
- </property>
- </bean>
- </array>
- </property>
- </bean>
- <bean id="sqlSession" class="org.mybatis.spring.SqlSessionTemplate">
- <constructor-arg index="0" ref="sqlSessionFactory" />
- </bean>
- <mvc:cors>
- <mvc:mapping path="/**" allowed-origins="*" allow-credentials="true" max-age="1800"
- allowed-methods="GET,POST,PUT,DELETE,PATCH,OPTIONS"/>
- </mvc:cors>
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.demo.wjj.mapper" />
- </bean>
- </beans>
|