Maven项目的子模块不能打成jar包输出到lib目录

发布于 2022-09-05 23:29:25 字数 154 浏览 26 评论 0

我在把项目拆分为多模块,提取了一个common模块,主要放一些共通类。在idea里启动服务器的时候出错,提示主模块里的某个类引用了common模块里的类,编译的时候却没有找到。我就去主模块target目录的lib文件夹里面找了一下,的确没有common模块生成的jar包,这是为什么啊老铁们?!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

九厘米的零° 2022-09-12 23:29:25

1、在common的pom.xml中加个打包方式

  <packaging>jar</packaging>

2、再对common模块执行下mvn clean install试试

-------补充-----
多项目的结构,没有分为父子结构:

admin项目的pom.xml配置

<project>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.demo</groupId>
    <artifactId>admin</artifactId>
    <version>1.0</version>
    <packaging>war</packaging>
    <name>${project.artifactId}</name>

  
    <dependencies>
        <dependency>
            <groupId>com.demo</groupId>
            <artifactId>common</artifactId>
            <version>1.0</version>
        </dependency>
        //admin项目中需要引用的其他依赖... 
        
   </dependencies>

</project>     

common项目的pom.xml配置

<project>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.demo</groupId>
    <artifactId>common</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>

  
    <dependencies>
        //common项目中需要引用的其他依赖... 
        
   </dependencies>

</project> 
流星番茄 2022-09-12 23:29:25

这是项目的目录结构,admin模块是父模块
图片描述

admin模块的pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>jyd</groupId>
    <artifactId>admin</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <modules>
        <module>../common</module>
        <module>../base</module>
        <module>../product</module>
    </modules>
    <name>jyd.admin</name>
    <url>http://maven.apache.org</url>

    <properties>
        <!-- spring版本号 -->
        <spring.version>4.0.0.RELEASE</spring.version>
        <shiro.version>1.2.3</shiro.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <!-- spring核心包 -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.version}</version>
        </dependency>

        <!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 -->
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>
        <!-- JSTL标签类 -->
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <!-- 日志文件管理包 -->

        <!-- 格式化对象,方便输出日志 -->
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.1.41</version>
        </dependency>

        <!-- 映入JSON -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.13</version>
        </dependency>
        <!-- 上传组件包 -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3.1</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.9</version>
        </dependency>

        <!-- 加入jstl依赖包 -->
        <dependency>
            <groupId>jstl</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.2.1-b03</version>
            <scope>provided</scope>
        </dependency>
        <!-- servlet -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>


        <!-- SECURITY begin -->
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-spring</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-cas</artifactId>
            <version>${shiro.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-ehcache</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <!-- SECURITY end -->

        <dependency>
            <groupId>jyd</groupId>
            <artifactId>base</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts.xwork</groupId>
            <artifactId>xwork-core</artifactId>
            <version>2.3.24.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.struts.xwork</groupId>
            <artifactId>xwork-core</artifactId>
            <version>2.3.24.1</version>
        </dependency>

        <!--SMS-->





    </dependencies>

    <build>
        <finalName>admin</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

base模块的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <artifactId>admin</artifactId>
        <groupId>jyd</groupId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../admin/pom.xml</relativePath>
    </parent>

    <artifactId>base</artifactId>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <shiro.version>1.2.3</shiro.version>
        <guava.version>17.0</guava.version>
        <dozer.version>5.5.1</dozer.version>
        <commons-lang3.version>3.3.2</commons-lang3.version>
        <commons-io.version>2.4</commons-io.version>
        <commons-codec.version>1.9</commons-codec.version>
        <commons-fileupload.version>1.3.1</commons-fileupload.version>
        <commons-beanutils.version>1.9.1</commons-beanutils.version>
        <jackson.version>2.2.3</jackson.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.2</version>
        </dependency>


        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>

        <!-- jackson json -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
            <version>${jackson.version}</version>
        </dependency>

        <!-- pojo copy -->
        <dependency>
            <groupId>net.sf.dozer</groupId>
            <artifactId>dozer</artifactId>
            <version>${dozer.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cn.jpush.api</groupId>
            <artifactId>jpush-client</artifactId>
            <version>3.2.8</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.1</version>
        </dependency>

        <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.5.3</version>
        </dependency>

        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.1.0</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
        <groupId>com.alibaba</groupId>
        <artifactId>druid</artifactId>
        <version>1.0.18</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.1.0</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.4.Final</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.4</version>
        </dependency>


        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.16</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.7</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.7</version>
        </dependency>

        <dependency>
            <groupId>com.googlecode.xmemcached</groupId>
            <artifactId>xmemcached</artifactId>
            <version>2.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.19</version>
        </dependency>

        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc</artifactId>
            <version>14</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.3</version>
        </dependency>
        <dependency>
            <groupId>com.sun.mail</groupId>
            <artifactId>javax.mail</artifactId>
            <version>1.5.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-support</artifactId>
            <version>2.0.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>2.5.2</version>
        </dependency>
        <dependency>
            <groupId>com.allinpay</groupId>
            <artifactId>allinpay-security</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.6</version>
        </dependency>

        <dependency>
            <groupId>org.htmlparser</groupId>
            <artifactId>htmlparser</artifactId>
            <version>2.1</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.xfire</groupId>
            <artifactId>xfire-spring</artifactId>
            <version>1.2.6</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.xfire</groupId>
                    <artifactId>xfire-xmlbeans</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- GENERAL UTILS begin -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons-codec.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>${commons-fileupload.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>${commons-beanutils.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- 提现jar包 开始-->
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk16</artifactId>
            <version>.46</version>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-ext-jdk16</artifactId>
            <version>1.45</version>
        </dependency>
        <dependency>
            <groupId>com.aipg</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.aipg</groupId>
            <artifactId>pdsinter</artifactId>
            <version>1.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.aipg</groupId>
            <artifactId>signtool</artifactId>
            <version>0.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.allinpay</groupId>
            <artifactId>xmlpull</artifactId>
            <version>1.1.3.1</version>
        </dependency>
        <dependency>
            <groupId>com.allinpay</groupId>
            <artifactId>xpp3_min</artifactId>
            <version>1.1.4c</version>
        </dependency>
        <dependency>
            <groupId>com.allinpay</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.1</version>
        </dependency>
        <!-- 提现jar包 结束-->

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.5</version>
        </dependency>
        <!-- <dependency>
             <groupId>com.alibaba</groupId>
             <artifactId>druid</artifactId>
             <version>1.0.18</version>
         </dependency>-->
        <!-- poi java处理word -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-scratchpad</artifactId>
            <version>3.11</version>
        </dependency>

        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-excelant</artifactId>
            <version>3.11</version>
        </dependency>

        <dependency>
            <groupId>fr.opensagres.xdocreport</groupId>
            <artifactId>org.apache.poi.xwpf.converter.xhtml</artifactId>
            <version>1.0.5</version>
        </dependency>

        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.6.0</version>
        </dependency>



        <!--jExcelApi java操作Excel文件-->
        <dependency>
            <groupId>net.sourceforge.jexcelapi</groupId>
            <artifactId>jxl</artifactId>
            <version>2.6.12</version>
        </dependency>

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-pool</artifactId>
            <version>5.7.0</version>
        </dependency>

        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>5.7.0</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>4.0.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
            <version>1.1.37</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20080701</version>
        </dependency>

        <!--<dependency>-->
        <!--<groupId>xmlbeans</groupId>-->
        <!--<artifactId>xbean</artifactId>-->
        <!--<version>2.2.0</version>-->
        <!--</dependency>-->
        <!-- poi java处理word  结束-->

        <dependency>
            <groupId>net.sf.json-lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4</version>
            <classifier>jdk15</classifier>
        </dependency>

        <!-- SECURITY begin -->
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-core</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-spring</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-cas</artifactId>
            <version>${shiro.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-web</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.shiro</groupId>
            <artifactId>shiro-ehcache</artifactId>
            <version>${shiro.version}</version>
        </dependency>
        <!-- SECURITY end -->


        <!-- CKFinder begin -->
        <dependency>
            <groupId>net.coobird</groupId>
            <artifactId>thumbnailator</artifactId>
            <version>0.4.2</version>
        </dependency>
        <dependency>
            <groupId>com.ckfinder</groupId>
            <artifactId>apache-ant-zip</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>com.ckfinder</groupId>
            <artifactId>ckfinder</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>com.ckfinder</groupId>
            <artifactId>ckfinderplugin-fileeditor</artifactId>
            <version>2.3</version>
        </dependency>
        <dependency>
            <groupId>com.ckfinder</groupId>
            <artifactId>ckfinderplugin-imageresize</artifactId>
            <version>2.3</version>
        </dependency>
        <!-- CKFinder end -->

        <!-- 消息队列 start-->
        <dependency>
            <groupId>com.aliyun.openservices</groupId>
            <artifactId>ons-client</artifactId>
            <version>1.2.5</version>
        </dependency>
        <!-- 消息队列 end -->
        <dependency>
            <groupId>xml-security</groupId>
            <artifactId>xmlsec</artifactId>
            <version>1.4.1</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>

    </dependencies>

    <!-- maven install 跳过单元测试 -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.mybatis.generator</groupId>
                <artifactId>mybatis-generator-maven-plugin</artifactId>
                <version>1.3.2</version>
                <configuration>
                    <verbose>true</verbose>
                    <overwrite>true</overwrite>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

common模块的pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>admin</artifactId>
        <groupId>jyd</groupId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../admin/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>common</artifactId>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

product模块的pom.xml(新建的空模块,没有任何代码)

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>admin</artifactId>
        <groupId>jyd</groupId>
        <version>1.0-SNAPSHOT</version>
        <relativePath>../admin/pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>product</artifactId>


</project>

对common模块执行mvn install提示的错误

Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install (default-cli) on project common: The packaging for this project did not assign a file to the build artifact

对common模块执行mvn compiler提示的错误

Failed to execute goal on project common: Could not resolve dependencies for project jyd:common:jar:1.0-SNAPSHOT: Could not find artifact jyd:base:jar:1.0-SNAPSHOT

项目的applicationContext.xml(放在admin模块下)

<?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:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop
           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
           http://www.springframework.org/schema/tx 
           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
            http://www.springframework.org/schema/mvc
            http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">

    <context:component-scan base-package="jyd.base.service"></context:component-scan>

    <bean id="propertyConfigurer"
          class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <list>
                <value>classpath:/config/jyd.properties</value>
            </list>
        </property>
    </bean>

    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource"/>
        <property name="configLocation" value="classpath:config/mapper/sqlmap-config.xml"/>
        <property name="mapperLocations" value="classpath:config/mapper/mapper*.xml"/>
    </bean>

    <!-- 阿里 druid数据库连接池 -->
    <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close">
        <!-- 数据库基本信息配置 -->
        <property name="url" value="${db.driverUrl}" />
        <property name="username" value="${db.username}" />
        <property name="password" value="${db.password}" />
        <property name="driverClassName" value="${db.driverClassName}" />
        <property name="filters" value="${db.filters}" />
        <!-- 最大并发连接数 -->
        <property name="maxActive" value="${db.maxActive}" />
        <!-- 初始化连接数量 -->
        <property name="initialSize" value="${db.initialSize}" />
        <!-- 配置获取连接等待超时的时间 -->
        <property name="maxWait" value="${db.maxWaitThreadCount}" />
        <!-- 最小空闲连接数 -->
        <property name="minIdle" value="${db.minIdle}" />
        <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
        <property name="timeBetweenEvictionRunsMillis" value="${timeBetweenEvictionRunsMillis}" />
        <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
        <property name="minEvictableIdleTimeMillis" value="${minEvictableIdleTimeMillis}" />
        <property name="validationQuery" value="${validationQuery}" />
        <property name="testWhileIdle" value="${testWhileIdle}" />
        <property name="testOnBorrow" value="${testOnBorrow}" />
        <property name="testOnReturn" value="${testOnReturn}" />
        <property name="poolPreparedStatements" value="${testOnReturn}" />
        <!-- 打开removeAbandoned功能 -->
        <property name="removeAbandoned" value="${removeAbandoned}" />
        <!-- 1800秒,也就是30分钟 -->
        <property name="removeAbandonedTimeout" value="${removeAbandonedTimeout}" />
        <!-- 关闭abanded连接时输出错误日志 -->
        <property name="logAbandoned" value="${logAbandoned}" />
    </bean>

    <!-- 蜗牛聚财 -->
    <bean id="investorDao" class="jyd.base.dao.InvestorDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="productDao" class="jyd.base.dao.ProductDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="logDao" class="jyd.base.dao.LogDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="menuDao" class="jyd.base.dao.MenuDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="systemUserDao" class="jyd.base.dao.SystemUserDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="userDao" class="jyd.base.dao.UserDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="roleDao" class="jyd.base.dao.RoleDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="roleMenuDao" class="jyd.base.dao.RoleMenuDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="accountFlowDao" class="jyd.base.dao.AccountFlowDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="actLogDao" class="jyd.base.dao.ActLogDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="bankcardDao" class="jyd.base.dao.BankcardDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="assetDao" class="jyd.base.dao.AssetDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="borrowCreditDao" class="jyd.base.dao.BorrowCreditDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="custcreditModDao" class="jyd.base.dao.CustcreditModDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="investCreditDao" class="jyd.base.dao.InvestCreditDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="keyValueDao" class="jyd.base.dao.KeyValueDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="paramDao" class="jyd.base.dao.ParamDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="procedureDao" class="jyd.base.dao.ProcedureDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="vipGradeDao" class="jyd.base.dao.VipGradeDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="shareActiveDao" class="jyd.base.dao.ShareActiveDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="userRoleDao" class="jyd.base.dao.UserRoleDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="dictDao" class="jyd.base.dao.DictDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="applyInfoDao" class="jyd.base.dao.ApplyInfoDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="loanInvestDao" class="jyd.base.dao.LoanInvestDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="repayDao" class="jyd.base.dao.RepayDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="friendDao" class="jyd.base.dao.FriendDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="financePlanApplyDao" class="jyd.base.dao.FinancePlanApplyDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="financePlanDao" class="jyd.base.dao.FinancePlanDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="claimsDao" class="jyd.base.dao.ClaimsDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="processStatusDao" class="jyd.base.dao.ProcessStatusDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="lendingDao" class="jyd.base.dao.LendingDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="operationLogDao" class="jyd.base.dao.OperationLogDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="rechargeDao" class="jyd.base.dao.RechargeDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="cashdrawDao" class="jyd.base.dao.CashdrawDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="financePlanInvestDao" class="jyd.base.dao.FinancePlanInvestDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="sysAccountFlowDao" class="jyd.base.dao.SysAccountFlowDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="rebateDao" class="jyd.base.dao.RebateDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="incomeDao" class="jyd.base.dao.IncomeDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="sitemsgDao" class="jyd.base.dao.SitemsgDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="WarningDao" class="jyd.base.dao.WarningDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="InstitutionDao" class="jyd.base.dao.InstitutionDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="RepaymentDao" class="jyd.base.dao.RepaymentDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="RepaymentApplyDao" class="jyd.base.dao.RepaymentApplyDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="New_platformDao" class="jyd.base.dao.New_platformDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="GuarantorDao" class="jyd.base.dao.GuarantorDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="BorrowerDao" class="jyd.base.dao.BorrowerDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="New_bankcardDao" class="jyd.base.dao.New_bankcardDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Investor_InvestmentDao" class="jyd.base.dao.Investor_InvestmentDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="InvestorAccDao" class="jyd.base.dao.InvestorAccDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="TransferProductDao" class="jyd.base.dao.TransferProductDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="BorrowApplicationDao" class="jyd.base.dao.BorrowApplicationDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="ProductRecommendDao" class="jyd.base.dao.ProductRecommendDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="InvestorAccDtlDao" class="jyd.base.dao.InvestorAccDtlDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="InvestorDrawingsApplyDao" class="jyd.base.dao.InvestorDrawingsApplyDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="RechargeNewDao" class="jyd.base.dao.RechargeNewDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="New_ActivityDao" class="jyd.base.dao.New_ActivityDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="App_BannerDao" class="jyd.base.dao.App_BannerDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Manage_Operation_RecordDao" class="jyd.base.dao.Manage_Operation_RecordDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Investor_Repayment_planDao" class="jyd.base.dao.Investor_Repayment_planDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Tl_DaifuDao" class="jyd.base.dao.Tl_DaifuDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="PromotionDao" class="jyd.base.dao.PromotionDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Investor_InvestmentForYYDao" class="jyd.base.dao.Investor_InvestmentForYYDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Product_InvestorsDao" class="jyd.base.dao.Product_InvestorsDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="ZSPdtTransferecordBeanDao" class="jyd.base.dao.ZSPdtTransferecordBeanDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="PTRResToSQLDao" class="jyd.base.dao.ResToSQLDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="ZSFundrepaymentDao" class="jyd.base.dao.ZSFundrepaymentDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="ZSInnertransferDao" class="jyd.base.dao.ZSInnertransferDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="InnerTransferDao" class="jyd.base.dao.InnerTransferDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="CreditDetailDao" class="jyd.base.dao.CreditDetailDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="RechargeErrorDao" class="jyd.base.dao.RechargeErrorDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="Zijiyudengji_infoDao" class="jyd.base.dao.Zijiyudengji_infoDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="ZSPlatformTransferDetailDao" class="jyd.base.dao.ZSPlatformTransferDetailDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="ZSPTRRespDao" class="jyd.base.dao.ZSPTRRespDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="DuiZhangDao" class="jyd.base.dao.DuiZhangDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="statisticDayFunDao" class="jyd.base.dao.StatisticDayFunDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>
    <bean id="statisticInvestorDao" class="jyd.base.dao.StatisticInvestorDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="tmpQixiRecordDao" class="jyd.base.dao.TmpQixiRecordDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <bean id="failMessageDao" class="jyd.base.dao.FailMessageDao">
        <property name="sqlSessionFactory" ref="sqlSessionFactory"></property>
    </bean>

    <!-- DAO接口所在包名,Spring会自动查找其下的类 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <property name="basePackage" value="jyd.product.mapper" />
        <property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
    </bean>

    <!-- Spring用于管理真正的ConnectionFactory的ConnectionFactory -->
    <bean id="connectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory">
        <!-- 目标ConnectionFactory对应真实的可以产生JMS Connection的ConnectionFactory -->
        <property name="targetConnectionFactory" >
            <!-- 真正可以产生Connection的ConnectionFactory,由对应的 JMS服务厂商提供-->
            <bean class="org.apache.activemq.ActiveMQConnectionFactory">
                <property name="brokerURL" value="${mq.url}"/>
            </bean>
        </property>
    </bean>

    <!-- Spring提供的JMS工具类,它可以进行消息发送、接收等 -->
    <bean id="jmsTemplateInvest" class="org.springframework.jms.core.JmsTemplate">
        <property name="connectionFactory" ref="connectionFactory"></property>
        <property name="defaultDestinationName" value="invest" />
        <property name="pubSubDomain" value="true" />
    </bean>

    <bean id="messageUtilsJson" class="jyd.base.ext.MessageUtilsJson">

    </bean>

    <!-- 通过该类可以获取当前spring上下文 -->
    <bean class="jyd.base.common.SpringContextTool" />

    <!-- aop日志 -->
    <bean id="logInterceptor" class="jyd.base.common.LogInterceptor"></bean>
    <aop:config proxy-target-class="true">
        <aop:aspect id="logAspectSYS" ref="logInterceptor">
            <aop:after-throwing method="throwing" throwing="ex" pointcut="execution(public * jyd.base.service..*.*(..))" />
        </aop:aspect>
    </aop:config>

    <!-- 事务  -->
    <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>

    <tx:advice id="txAdvice" transaction-manager="transactionManager">
        <tx:attributes>
            <tx:method name="add*" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
            <tx:method name="update*" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
            <tx:method name="save*" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.jyd.base.exception.ServerException" />
            <tx:method name="delete*" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
            <tx:method name="do*" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
            <tx:method name="find*" read-only="true" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
            <tx:method name="query*" read-only="true" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />

            <tx:method name="insert" propagation="REQUIRED" rollback-for="RuntimeException,jyd.jyd.base.exception.ServerException" />
        </tx:attributes>
    </tx:advice>

    <bean id="msgListener" class="jyd.base.ext.MessageListenerClient"/>

    <!-- 继承自AuthorizingRealm的自定义Realm,即指定Shiro验证用户登录的类为自定义的ShiroDbRealm.java -->
    <bean id="systemAuthorizingRealm" class="jyd.base.security.SystemAuthorizingRealm"/>

    <!-- Shiro默认会使用Servlet容器的Session,可通过sessionMode属性来指定使用Shiro原生Session -->
    <!-- 即<property name="sessionMode" value="native"/>,详细说明见官方文档 -->
    <!-- 这里主要是设置自定义的单Realm应用,若有多个Realm,可使用'realms'属性代替 -->
    <bean id="securityManager" class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
        <property name="realm" ref="systemAuthorizingRealm"/>
        <property name="cacheManager" ref="shiroEhcacheManager"/>
    </bean>

    <!-- Shiro主过滤器本身功能十分强大,其强大之处就在于它支持任何基于URL路径表达式的、自定义的过滤器的执行 -->
    <!-- Web应用中,Shiro可控制的Web请求必须经过Shiro主过滤器的拦截,Shiro对基于Spring的Web应用提供了完美的支持 -->
    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <!-- Shiro的核心安全接口,这个属性是必须的 -->
        <property name="securityManager" ref="securityManager"/>
        <!-- 要求登录时的链接(可根据项目的URL进行替换),非必须的属性,默认会自动寻找Web工程根目录下的"/login.jsp"页面 -->
        <property name="loginUrl" value="/login"/>
        <!-- 登录成功后要跳转的连接(本例中此属性用不到,因为登录成功后的处理逻辑在LoginController里硬编码为main.jsp了) -->
        <!-- <property name="successUrl" value="/system/main"/> -->
        <!-- 用户访问未对其授权的资源时,所显示的连接 -->
        <!-- 若想更明显的测试此属性可以修改它的值,如unauthor.jsp,然后用[玄玉]登录后访问/admin/listUser.jsp就看见浏览器会显示unauthor.jsp -->
        <property name="unauthorizedUrl" value="/"/>
        <!-- Shiro连接约束配置,即过滤链的定义 -->
        <!-- 此处可配合我的这篇文章来理解各个过滤连的作用http://blog.csdn.net/jadyer/article/details/12172839 -->
        <!-- 下面value值的第一个'/'代表的路径是相对于HttpServletRequest.getContextPath()的值来的 -->
        <!-- anon:它对应的过滤器里面是空的,什么都没做,这里.do和.jsp后面的*表示参数,比方说login.jsp?main这种 -->
        <!-- authc:该过滤器下的页面必须验证后才能访问,它是Shiro内置的一个拦截器org.apache.shiro.web.filter.authc.FormAuthenticationFilter -->
        <property name="filterChainDefinitions">
            <value>
                /user/login=anon
                /user/getVerifyCodeImage=anon
                /main**=authc
                /logout = logout
                /user/info**=authc
                /user/index=user
                /admin/listUser**=authc,perms[admin:manage]
            </value>
        </property>
    </bean>

    <!-- 保证实现了Shiro内部lifecycle函数的bean执行 -->
    <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>

    <!-- 开启Shiro的注解(如@RequiresRoles,@RequiresPermissions),需借助SpringAOP扫描使用Shiro注解的类,并在必要时进行安全逻辑验证 -->
    <!-- 配置以下两个bean即可实现此功能 -->
    <!-- Enable Shiro Annotations for Spring-configured beans. Only run after the lifecycleBeanProcessor has run -->
    <!-- 由于本例中并未使用Shiro注解,故注释掉这两个bean(个人觉得将权限通过注解的方式硬编码在程序中,查看起来不是很方便,没必要使用) -->
    <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
          depends-on="lifecycleBeanPostProcessor"/>
    <!--    <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
            <property name="securityManager" ref="securityManager"/>
        </bean>-->

    <!--  缓存配置-->
    <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
        <property name="configLocation" value="classpath:cache/ehcache-local.xml"/>
    </bean>

    <!--shiro缓存配置-->
    <bean id="shiroEhcacheManager" class="org.apache.shiro.cache.ehcache.EhCacheManager">
        <property name="cacheManagerConfigFile" value="classpath:cache/ehcache-shiro.xml"/>
    </bean>

    <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
        <property name="maxUploadSize" value="10485760"/>
    </bean>

    <!-- 配置 JSR303 Bean Validator 定义 -->
    <bean id="validator" class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>

</beans>

服务器启动时提示的错误

Error loading class [jyd.base.dao.InvestorDao] for bean with name 'investorDao' defined in URL [file:/E:/project/admin/target/admin/WEB-INF/classes/applicationContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: jyd/common/dao/BaseDao
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文