applicationcontext-base.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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" xmlns:context="http://www.springframework.org/schema/context"
  4. xmlns:util="http://www.springframework.org/schema/util"
  5. xsi:schemaLocation="http://www.springframework.org/schema/beans
  6. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  7. http://www.springframework.org/schema/context
  8. http://www.springframework.org/schema/context/spring-context-3.0.xsd
  9. http://www.springframework.org/schema/util
  10. http://www.springframework.org/schema/util/spring-util.xsd">
  11. <context:annotation-config />
  12. <context:component-scan base-package="com.xxl.service.impl, com.xxl.dao.impl" />
  13. <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
  14. <property name="templateLoaderPath" value="/WEB-INF/template/" />
  15. <property name="freemarkerSettings">
  16. <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
  17. <property name="location" value="classpath:freemarker.properties" />
  18. </bean>
  19. </property>
  20. <property name="freemarkerVariables">
  21. <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
  22. <property name="location" value="classpath:freemarker.variables.properties" />
  23. </bean>
  24. </property>
  25. </bean>
  26. <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  27. <property name="fileEncoding" value="utf-8" />
  28. <property name="locations">
  29. <list>
  30. <value>classpath*:jdbc.properties</value>
  31. </list>
  32. </property>
  33. </bean>
  34. </beans>