123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <?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:tx="http://www.alibaba.com/schema/stat"
- xmlns:aop="http://www.springframework.org/schema/aop"
- 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.alibaba.com/schema/stat
- http://www.alibaba.com/schema/stat.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc.xsd">
- <context:property-placeholder location="classpath:db.properties"/>
- <context:component-scan base-package="com"/>
- <!-- <tx:annotation-driven/>-->
- <aop:aspectj-autoproxy proxy-target-class="true"/>
- <mvc:annotation-driven/>
- <mvc:default-servlet-handler/>
- <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
- <property name="driverClassName" value="${jdbc.driver}"/>
- <property name="url" value="${jdbc.url}"/>
- <property name="username" value="${jdbc.username}"/>
- <property name="password" value="${jdbc.password}"/>
- </bean>
- <!-- <mvc:interceptors>-->
- <!-- <mvc:interceptor>-->
- <!-- <mvc:mapping path="/**"/>-->
- <!-- <mvc:exclude-mapping path="/user/login"/>-->
- <!-- <mvc:exclude-mapping path="/user/login2"/>-->
- <!-- <mvc:exclude-mapping path="/user/register"/>-->
- <!-- <mvc:exclude-mapping path="/user/register2"/>-->
- <!-- <bean id="loginInterceptor" class="com.itstudy.Interceptor.MyInterceptor"/>-->
- <!-- </mvc:interceptor>-->
- <!-- </mvc:interceptors>-->
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="dataSource"/>
- <property name="configLocation" value="classpath:mybatis-config2.xml"/>
- </bean>
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="com.group04"/>
- </bean>
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource"/>
- </bean>
- <!--配置视图解析器-->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/pages/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
- </beans>
|