1
0

applicationContext.xml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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"
  4. xmlns:p="http://www.springframework.org/schema/p"
  5. xmlns:aop="http://www.springframework.org/schema/aop"
  6. xmlns:mvc="http://www.springframework.org/schema/mvc"
  7. xmlns:context="http://www.springframework.org/schema/context"
  8. xsi:schemaLocation="http://www.springframework.org/schema/beans
  9. http://www.springframework.org/schema/beans/spring-beans.xsd
  10. http://www.springframework.org/schema/mvc
  11. http://www.springframework.org/schema/mvc/spring-mvc.xsd
  12. http://www.springframework.org/schema/context
  13. http://www.springframework.org/schema/context/spring-context.xsd
  14. http://www.springframework.org/schema/aop
  15. http://www.springframework.org/schema/aop/spring-aop-4.3.xsd" >
  16. <!-- 数据源的配置 -->
  17. <!-- 线上环境数据库地址 -->
  18. <bean id = "dataSource" class="org.apache.commons.dbcp.BasicDataSource">
  19. <property name="driverClassName" value = "com.mysql.jdbc.Driver"></property>
  20. <property name="url" value = "jdbc:mysql://118.178.58.178:3306/fund_trusteeship_ccb?useUnicode=true&amp;characterEncoding=UTF-8"></property>
  21. <property name="username" value = "root"></property>
  22. <property name="password" value = "sql345678"></property>
  23. </bean>
  24. <!-- 本地开发环境数据库地址 -->
  25. <!-- <bean id = "dataSource" class="org.apache.commons.dbcp.BasicDataSource">
  26. <property name="driverClassName" value = "com.mysql.jdbc.Driver"></property>
  27. <property name="url" value = "jdbc:mysql://127.0.0.1:3306/fund_trusteeship_ccb?useUnicode=true&amp;characterEncoding=UTF-8"></property>
  28. <property name="username" value = "root"></property>
  29. <property name="password" value = "sql345678"></property>
  30. </bean> -->
  31. <!-- session工厂 -->
  32. <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
  33. <property name="dataSource" ref="dataSource"/>
  34. <property name="mapperLocations" value="classpath:com/fuzamei/mapper/*.xml"/>
  35. <property name="configLocation" value = "classpath:mybatis-config.xml"/>
  36. </bean>
  37. <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
  38. <!-- <property name="basePackage" value="com.fuzamei.mapper" /> -->
  39. <property name="basePackage" value="com.fuzamei.mapperInterface" />
  40. <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
  41. </bean>
  42. <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
  43. <property name="defaultEncoding" value="utf-8"/>
  44. <property name="maxUploadSize" value="20000000000"/>
  45. <property name="maxInMemorySize" value="200000"/>
  46. </bean>
  47. </beans>