Explorar el Código

第三方商户库存共享framework模块修改

hyq hace 6 años
padre
commit
6f6bfa3405

+ 8 - 6
kmall-framework/src/main/webapp/WEB-INF/web.xml

@@ -23,12 +23,6 @@
             classpath*:kmall-*.xml
         </param-value>
     </context-param>
-
-    <!--<context-param>
-        <param-name>log4jRefreshInterval</param-name>
-        <param-value>600000</param-value>
-    </context-param>-->
-
     <!--logback 日志-->
     <context-param>
         <param-name>logbackConfigLocation</param-name>
@@ -45,6 +39,14 @@
     </listener>
 
     <listener>
+        <listener-class>com.kmall.common.listener.QuartzContextListener</listener-class>
+    </listener>
+
+    <listener>
+        <listener-class>com.kmall.common.listener.ContextFinalizer</listener-class>
+    </listener>
+
+    <listener>
         <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
     </listener>
 

+ 8 - 0
kmall-framework/src/test/resources/applicationContext-test.xml

@@ -111,6 +111,14 @@
             </list>
         </property>
         <property name="connectionInitSqls" value="set names utf8mb4;"/>
+        <!--&lt;!&ndash; 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 &ndash;&gt;-->
+        <property name="timeBetweenEvictionRunsMillis" value="60000" />
+        <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
+        <property name="minEvictableIdleTimeMillis" value="300000" />
+        <!-- 建议配置为true,不影响性能,并且保证安全性。申请连接的时候检测,如果空闲时间大于timeBetweenEvictionRunsMillis,执行validationQuery检测连接是否有效 -->
+        <property name="testWhileIdle" value="true" />
+        <!-- 指定每个连接上PSCache的大小   -->
+        <property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
     </bean>
 
     <bean id="stat-filter" class="com.alibaba.druid.filter.stat.StatFilter">