hjg
2023-10-16 a92547a2e458ca159b4877fb901f27227b941acf
提交 | 用户 | 时间
58d006 1 <?xml version="1.0" encoding="UTF-8"?>
A 2 <beans xmlns="http://www.springframework.org/schema/beans"
3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
4     xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context"
5        xmlns:mvc="http://www.springframework.org/schema/mvc"
6     xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jms="http://www.springframework.org/schema/jms"
7     xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
8     xmlns:jaxws="http://cxf.apache.org/jaxws"
9     xmlns:jaxrs="http://cxf.apache.org/jaxrs"
10     xsi:schemaLocation="http://www.springframework.org/schema/beans
11     http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
12     http://www.springframework.org/schema/util
13     http://www.springframework.org/schema/util/spring-util-4.1.xsd
14     http://www.springframework.org/schema/context
15     http://www.springframework.org/schema/context/spring-context-4.1.xsd
16     http://www.springframework.org/schema/aop
17     http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
18     http://www.springframework.org/schema/tx
19     http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
20     http://cxf.apache.org/jaxws
21     http://cxf.apache.org/schemas/jaxws.xsd
22     http://cxf.apache.org/jaxrs
23     http://cxf.apache.org/schemas/jaxrs.xsd">
24
25     <bean id="hikari" class="com.zaxxer.hikari.HikariDataSource">
26         <property name="driverClassName" value="net.sourceforge.jtds.jdbc.Driver" />
f6c2f1 27         <property name="jdbcUrl" value="jdbc:jtds:sqlserver://10.22.3.34;databaseName=goblinTest" />
58d006 28         <property name="username" value="sa" />
f6c2f1 29         <property name="password" value="mingtai@80565" />
867641 30     <!--    <property name="jdbcUrl" value="jdbc:jtds:sqlserver://47.104.255.13;databaseName=goblin_10" />
A 31         <property name="username" value="goblin" />
32         <property name="password" value="goblin_2021" />-->
f6c2f1 33 <!--        <property name="jdbcUrl"-->
H 34 <!--            value="jdbc:jtds:sqlserver://127.0.0.1:1433;databaseName=goblin" />-->
35 <!--        <property name="username" value="sa" />-->
36 <!--        <property name="password" value="123" />-->
58d006 37         <property name="readOnly" value="false" />
A 38         <property name="connectionTimeout" value="30000" />
39         <property name="idleTimeout" value="600000" />
40         <property name="validationTimeout" value="3000" />
41         <property name="connectionTestQuery" value="select 1"></property>
42         <property name="minimumIdle" value="30" />
43         <property name="maxLifetime" value="1800000" />
44         <property name="maximumPoolSize" value="150" />
45     </bean>
46
47     <!-- mybatis相关配置 -->
48     <bean id="sqlsessionfactory" class="org.mybatis.spring.SqlSessionFactoryBean">
49         <property name="dataSource" ref="hikari"></property>
50         <property name="mapperLocations" value="classpath*:com/mandi/**/mapper/xmls/*.xml" />
51         <property name="configLocation" value="classpath:mybatis.xml"></property>
52     </bean>
53
54     <bean id="mapperscanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer">
55         <property name="basePackage" value="com.mandi.**.mapper"></property>
56         <property name="sqlSessionFactoryBeanName" value="sqlsessionfactory" />
57     </bean>
58
59
60     <bean id="mybatistxm"
61         class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
62         <property name="dataSource" ref="hikari"></property>
63     </bean>
64     <tx:annotation-driven transaction-manager="mybatistxm"
65         proxy-target-class="true"></tx:annotation-driven>
66
67
68     <bean id="sqlsessiontemplate" class="org.mybatis.spring.SqlSessionTemplate">
69         <constructor-arg index="0" ref="sqlsessionfactory" />
70     </bean>
71     <!-- -->
72     <bean id="dtf" class="java.text.SimpleDateFormat">
73         <constructor-arg value="yyyy-MM-dd HH:mm:ss" />
74     </bean>
75     <bean id="df" class="java.text.SimpleDateFormat">
76         <constructor-arg value="yyyy-MM-dd" />
77     </bean>
78     <bean id="tf" class="java.text.SimpleDateFormat">
79         <constructor-arg value="HH:mm:ss" />
80     </bean>
81     <bean id="ydf" class="java.text.SimpleDateFormat">
82         <constructor-arg value="yyyyMMdd" />
83     </bean>
84     <bean id="jdao" class="org.springframework.jdbc.core.JdbcTemplate">
85         <property name="dataSource">
86             <ref bean="hikari" />
87         </property>
88     </bean>
89
90     <!-- spring w文件上传 -->
91     <bean id="multipartResolver"
92         class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
93         <property name="defaultEncoding" value="utf-8"></property>
94         <property name="maxUploadSize" value="10485760000"></property>
95         <property name="maxInMemorySize" value="40960"></property>
96     </bean>
97
98     <!-- spring 多语言local配置 -->
99     <bean id="localeResolver"
100         class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
101         <property name="cookieMaxAge" value="604800" />
102         <property name="defaultLocale" value="zh_CN" />
103         <property name="cookieName" value="Language"></property>
104     </bean>
105
106
107     <!-- auto scan -->
108     <context:annotation-config />
109     <context:component-scan base-package="com.mandi">
110         <context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller" />
111     </context:component-scan>
112
113
114     <!--NC发货单推送分单系统-->
115     <bean id="invoiceInterface" class="com.mandi.webservice.service.impl.InvoiceService"></bean>
116      <jaxrs:server id="invoiceservice" address="/invoice">
117         <jaxrs:serviceBeans>
118             <ref bean="invoiceInterface"/>
119         </jaxrs:serviceBeans>
120     </jaxrs:server>
121
122 </beans>