1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?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"
- xmlns:context="http://www.springframework.org/schema/context"
- 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">
- <context:property-placeholder location="classpath:db.properties"/>
- <context:component-scan base-package="WebsiteES"/>
- <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>
- <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
- <property name="dataSource" ref="dataSource" />
- <property name="configLocation" value="classpath:MyBatis-config.xml"/>
- </bean>
- <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
- <property name="basePackage" value="WebsiteES.myBatis"/>
- </bean>
- <!--Spring MVC.....(for primary web service)-->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value = "/"/>
- <property name="suffix" value = ".jsp"/>
- </bean>
- <!-- should add multipartResolver to use -->
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="defaultEncoding" value="utf-8"/>
- <property name="maxUploadSize" value="2097152"/>
- </bean>
- <mvc:annotation-driven/>
- <mvc:default-servlet-handler/>
- <!-- <mvc:interceptors>
- <mvc:interceptor>
- <mvc:mapping path="/*"/>
- <mvc:exclude-mapping path="/login"/>
- <mvc:exclude-mapping path="/regist"/>
- <bean id="InterceptorLogin" class="WebsiteES.InterceptorLogin"/>
- </mvc:interceptor>
- </mvc:interceptors> -->
- </beans>
|