Skip to content

Commit

Permalink
调整spring配置文件结构
Browse files Browse the repository at this point in the history
  • Loading branch information
henryyan committed Dec 27, 2015
1 parent f1e8f13 commit 39cf2ae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
12 changes: 2 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,8 @@
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
</webAppConfig>
<stopKey>kad</stopKey>
<stopPort>9999</stopPort>
</configuration>
</plugin>

Expand All @@ -497,16 +499,6 @@
</configuration>
</plugin>

<!-- tomcat6 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat6-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<path>/${project.artifactId}</path>
</configuration>
</plugin>

<!-- tomcat7 -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
Expand Down
9 changes: 7 additions & 2 deletions src/main/resources/beans/beans-activiti.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

<context:component-scan
base-package="org.activiti.conf,org.activiti.rest.editor,org.activiti.rest.service">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>

<!-- 单例json对象 -->
<bean id="objectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"/>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/beans/beans-base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<!-- 使用annotation 自动注册bean, 并保证@Required、@Autowired的属性被注入 -->
<context:component-scan
base-package="me.kafeitu.demo.activiti,org.activiti.conf,org.activiti.rest.editor,org.activiti.rest.service">
base-package="me.kafeitu.demo.activiti">
<context:exclude-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
</beans>

0 comments on commit 39cf2ae

Please sign in to comment.