<?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:util="http://www.springframework.org/schema/util"
|
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jms="http://www.springframework.org/schema/jms"
|
xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
|
xmlns:jaxws="http://cxf.apache.org/jaxws"
|
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
http://www.springframework.org/schema/util
|
http://www.springframework.org/schema/util/spring-util-4.1.xsd
|
http://www.springframework.org/schema/context
|
http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
http://www.springframework.org/schema/aop
|
http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
|
http://www.springframework.org/schema/tx
|
http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
|
http://cxf.apache.org/jaxws
|
http://cxf.apache.org/schemas/jaxws.xsd
|
http://cxf.apache.org/jaxrs
|
http://cxf.apache.org/schemas/jaxrs.xsd">
|
|
<bean id="hikari" class="com.zaxxer.hikari.HikariDataSource">
|
<property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver" />
|
<!--<property name="jdbcUrl" value="jdbc:jtds:sqlserver://10.1.1.9:1433;databaseName=IPASS" />
|
<property name="username" value="sa" />
|
<property name="password" value="mingtai@80565" />-->
|
<!-- <property name="jdbcUrl" value="jdbc:jtds:sqlserver://47.104.255.13;databaseName=goblin_10" />
|
<property name="username" value="goblin" />
|
<property name="password" value="goblin_2021" />-->
|
<property name="jdbcUrl"
|
value="jdbc:jtds:sqlserver://127.0.0.1:1433;databaseName=goblin" />
|
<property name="username" value="sa" />
|
<property name="password" value="123" />
|
<property name="readOnly" value="false" />
|
<property name="connectionTimeout" value="30000" />
|
<property name="idleTimeout" value="600000" />
|
<property name="validationTimeout" value="3000" />
|
<property name="connectionTestQuery" value="select 1"></property>
|
<property name="minimumIdle" value="30" />
|
<property name="maxLifetime" value="1800000" />
|
<property name="maximumPoolSize" value="150" />
|
</bean>
|
|
<!-- mybatis相关配置 -->
|
<bean id="sqlsessionfactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
<property name="dataSource" ref="hikari"></property>
|
<property name="mapperLocations" value="classpath*:com/mandi/**/mapper/xmls/*.xml" />
|
<property name="configLocation" value="classpath:mybatis.xml"></property>
|
</bean>
|
|
<bean id="mapperscanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
<property name="basePackage" value="com.mandi.**.mapper"></property>
|
<property name="sqlSessionFactoryBeanName" value="sqlsessionfactory" />
|
</bean>
|
|
|
<bean id="mybatistxm"
|
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
<property name="dataSource" ref="hikari"></property>
|
</bean>
|
<tx:annotation-driven transaction-manager="mybatistxm"
|
proxy-target-class="true"></tx:annotation-driven>
|
|
|
<bean id="sqlsessiontemplate" class="org.mybatis.spring.SqlSessionTemplate">
|
<constructor-arg index="0" ref="sqlsessionfactory" />
|
</bean>
|
<!-- -->
|
<bean id="dtf" class="java.text.SimpleDateFormat">
|
<constructor-arg value="yyyy-MM-dd HH:mm:ss" />
|
</bean>
|
<bean id="df" class="java.text.SimpleDateFormat">
|
<constructor-arg value="yyyy-MM-dd" />
|
</bean>
|
<bean id="tf" class="java.text.SimpleDateFormat">
|
<constructor-arg value="HH:mm:ss" />
|
</bean>
|
<bean id="ydf" class="java.text.SimpleDateFormat">
|
<constructor-arg value="yyyyMMdd" />
|
</bean>
|
<bean id="jdao" class="org.springframework.jdbc.core.JdbcTemplate">
|
<property name="dataSource">
|
<ref bean="hikari" />
|
</property>
|
</bean>
|
|
<!-- spring w文件上传 -->
|
<bean id="multipartResolver"
|
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
<property name="defaultEncoding" value="utf-8"></property>
|
<property name="maxUploadSize" value="10485760000"></property>
|
<property name="maxInMemorySize" value="40960"></property>
|
</bean>
|
|
<!-- spring 多语言local配置 -->
|
<bean id="localeResolver"
|
class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
|
<property name="cookieMaxAge" value="604800" />
|
<property name="defaultLocale" value="zh_CN" />
|
<property name="cookieName" value="Language"></property>
|
</bean>
|
|
|
<!-- auto scan -->
|
<context:annotation-config />
|
<context:component-scan base-package="com.mandi">
|
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
|
</context:component-scan>
|
|
|
<!--NC发货单推送分单系统-->
|
<bean id="invoiceInterface" class="com.mandi.webservice.service.impl.InvoiceService"></bean>
|
<jaxrs:server id="invoiceservice" address="/invoice">
|
<jaxrs:serviceBeans>
|
<ref bean="invoiceInterface"/>
|
</jaxrs:serviceBeans>
|
</jaxrs:server>
|
|
</beans>
|