Procházet zdrojové kódy

Merge branch 'master' of zcb/kmall-pt-general into master

张创标 před 4 roky
rodič
revize
94a228cbb0

+ 10 - 16
kmall-admin/src/main/resources/spring/spring-context.xml

@@ -5,29 +5,23 @@
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="
-        http://www.springframework.org/schema/beans 
-        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd        
-        http://www.springframework.org/schema/context 
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+        http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context-4.2.xsd
-     	http://www.springframework.org/schema/aop 
+     	http://www.springframework.org/schema/aop
      	http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
-		http://www.springframework.org/schema/mvc 
+		http://www.springframework.org/schema/mvc
      	http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
 
+    <import resource="spring-main.xml"/>
 
     <context:component-scan base-package="com.kmall.admin.**, com.kmall.api.**, com.kmall.manager.**, com.kmall.common.**, com.kmall.gen.**">
+        <context:exclude-filter type="aspectj" expression="com.kmall.admin.controller.**"/>
+        <context:exclude-filter type="aspectj" expression="com.kmall.admin.websocket.**"/>
     </context:component-scan>
 
-    <bean id="placeholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
-        <property name="locations">
-            <list>
-                <value>classpath:conf/db.properties</value>
-                <value>classpath:conf/servlet.properties</value>
-                <value>classpath:conf/fastdfs.properties</value>
-            </list>
-        </property>
-        <property name="fileEncoding" value="UTF-8"/>
-    </bean>
 
 
-</beans>
+
+</beans>

+ 16 - 3
kmall-admin/src/main/resources/spring/spring-main.xml

@@ -5,7 +5,7 @@
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="
-        http://www.springframework.org/schema/beans 
+        http://www.springframework.org/schema/beans
         http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
         http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context-4.2.xsd
@@ -14,10 +14,23 @@
 		http://www.springframework.org/schema/mvc
      	http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
 
-    <import resource="spring-context.xml"/>
+
+    <bean id="placeholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+        <property name="locations">
+            <list>
+                <value>classpath:conf/db.properties</value>
+                <value>classpath:conf/servlet.properties</value>
+                <value>classpath:conf/fastdfs.properties</value>
+            </list>
+        </property>
+        <property name="fileEncoding" value="UTF-8"/>
+    </bean>
+
     <import resource="classpath:spring/spring-manager-main.xml"/>
     <import resource="spring-mvc.xml"/>
     <import resource="spring-shiro.xml"/>
     <import resource="classpath:kmall-api.xml"/>
 
-</beans>
+
+
+</beans>

+ 10 - 6
kmall-admin/src/main/resources/spring/spring-mvc.xml

@@ -5,17 +5,21 @@
        xmlns:aop="http://www.springframework.org/schema/aop"
        xmlns:mvc="http://www.springframework.org/schema/mvc"
        xsi:schemaLocation="
-        http://www.springframework.org/schema/beans 
-        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd        
-        http://www.springframework.org/schema/context 
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+        http://www.springframework.org/schema/context
         http://www.springframework.org/schema/context/spring-context-4.2.xsd
-     	http://www.springframework.org/schema/aop 
+     	http://www.springframework.org/schema/aop
      	http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
-		http://www.springframework.org/schema/mvc 
+		http://www.springframework.org/schema/mvc
      	http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
 
     <mvc:default-servlet-handler/>
 
+    <context:component-scan base-package="com.kmall.admin.**, com.kmall.api.**, com.kmall.manager.**, com.kmall.common.**, com.kmall.gen.**">
+        <context:exclude-filter type="aspectj" expression="com.kmall.admin.task.**"/>
+    </context:component-scan>
+
     <aop:aspectj-autoproxy proxy-target-class="true"/>
     <mvc:annotation-driven>
         <mvc:message-converters register-defaults="true">
@@ -103,4 +107,4 @@
     </bean>
 
 
-</beans>
+</beans>

+ 1 - 1
kmall-admin/src/main/webapp/WEB-INF/web.xml

@@ -27,7 +27,7 @@
     <context-param>
         <param-name>contextConfigLocation</param-name>
         <param-value>
-            classpath:spring/spring-main.xml
+            classpath:spring/spring-context.xml
         </param-value>
     </context-param>