pom.xml导入依赖报错,导入springboot项目pom报错

  pom.xml导入依赖报错,导入springboot项目pom报错

  

目录

pom.xml文件注入试验测试依赖时报错分析原因解决方法跳羚中pom.xml之间的依赖依赖关系所用到的技术空谈不值钱,详见配置文件

 

  

pom.xml文件注入test测试依赖时报错

 

  报错:无法读取org。spring框架。启动:弹簧启动起动机测试:罐子:2。0 .4 .释放;排放;发布的项目描述符

  

分析原因

有可能是默认版本太高

 

  

解决方法

降低版本

 

  

springboot中pom.xml之间的依赖

 

  

依赖关系

父(依赖关系跳根)-公共(父父) -管理(父父,依赖关系公共) -休息(父父,依赖关系公共) -聊天(父父,依赖关系公共)-门户(父)

 

  

所用到的技术

弹簧靴弹簧靴起动机-百里香树叶spring-boot-starter-data-redis spring-boot-starter-data-JPA缓存支持spring-boot-maven-plugin maven-compiler-plugin Shiro-spring Shiro-web Shiro-ehcacheshiro-redis!-雷迪斯缓存四郎-百里香-extras-shirohttpclientnetty-all Jackson-databindruid MySQL-connector-Javajson格式化类库:

 

  fastjsonguavajackson-注释Spring RESTful接口文档化:

  春狐-霸气2春狐-霸气-uinekohtml

  

talk is cheap , 详见配置文件

父项目

 

  ?可扩展标记语言版本=1.0 编码=UTF八号?项目xmlns= http://maven。阿帕奇。org/POM/4。0 .0 xmlns : xsi= http://www。w3。org/2001/XML schema-instance xsi :架构位置= http://maven。阿帕奇。org/POM/4。0 .0 http://maven.apache.org/xsd/maven-4.0.0.xsd模型版本4 .0 .0/模型版本groupIdcom.yourproject/groupId artifactIdyourproject-父/artifactId版本1.0-快照/版本-集中定义依赖版本号与基本配置-房地产项目。建造。源编码

  g>UTF-8</project.build.sourceEncoding>        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>        <java.version>1.8</java.version>         <druid.version>1.0.29</druid.version>        <fastjson.version>1.2.16</fastjson.version>        <guava.version>19.0</guava.version>        <shiro.version>1.3.2</shiro.version>        <shiro.th.version>1.2.1</shiro.th.version>        <shiro.redis.version>2.4.2.1-RELEASE</shiro.redis.version>        <nekohtml.version>1.9.22</nekohtml.version>        <fasterxml.version>2.8.0</fasterxml.version>        <springfox.version>2.2.2</springfox.version>    </properties>     <dependencyManagement>        <dependencies>  <dependency>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-dependencies</artifactId>      <version>2.0.5.RELEASE</version>      <type>pom</type>      <scope>import</scope>  </dependency>  <dependency>      <groupId>com.alibaba</groupId>      <artifactId>druid</artifactId>      <version>${druid.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-web</artifactId>      <version>${shiro.version}</version>  </dependency>  <dependency>      <groupId>com.github.theborakompanioni</groupId>      <artifactId>thymeleaf-extras-shiro</artifactId>      <version>${shiro.th.version}</version>  </dependency>  <dependency>      <groupId>org.apache.shiro</groupId>      <artifactId>shiro-ehcache</artifactId>      <version>${shiro.th.version}</version>  </dependency>  <dependency>      <groupId>org.crazycake</groupId>      <artifactId>shiro-redis</artifactId>      <version>${shiro.redis.version}</version>  </dependency>  <dependency>      <groupId>net.sourceforge.nekohtml</groupId>      <artifactId>nekohtml</artifactId>      <version>${nekohtml.version}</version>  </dependency>   <!--json格式化类库 -->  <dependency>      <groupId>com.alibaba</groupId>      <artifactId>fastjson</artifactId>      <version>${fastjson.version}</version>  </dependency>  <dependency>      <groupId>com.google.guava</groupId>      <artifactId>guava</artifactId>      <version>${guava.version}</version>  </dependency>  <dependency>      <groupId>com.fasterxml.jackson.core</groupId>      <artifactId>jackson-annotations</artifactId>      <version>${fasterxml.version}</version>  </dependency>  <!--Spring RESTful接口文档化 -->  <dependency>      <groupId>io.springfox</groupId>      <artifactId>springfox-swagger2</artifactId>      <version>${springfox.version}</version>  </dependency>  <dependency>      <groupId>io.springfox</groupId>      <artifactId>springfox-swagger-ui</artifactId>      <version>${springfox.version}</version>  </dependency>        </dependencies>    </dependencyManagement> </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>yourproject-parent</artifactId>        <groupId>com.yourproject</groupId>        <version>1.0-SNAPSHOT</version>        <relativePath>../yourproject-parent/pom.xml</relativePath>    </parent>    <modelVersion>4.0.0</modelVersion>    <groupId>com.yourproject</groupId>    <artifactId>yourproject-common</artifactId>      <dependencies>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-data-jpa</artifactId>        </dependency>        <!--缓存支持-->        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-cache</artifactId>        </dependency>        <!--ehcache支持-->        <dependency>        <groupId>net.sf.ehcache</groupId>        <artifactId>ehcache</artifactId>        </dependency>        <dependency>  <groupId>mysql</groupId>  <artifactId>mysql-connector-java</artifactId>  <scope>runtime</scope>        </dependency>        <dependency>  <groupId>com.alibaba</groupId>  <artifactId>druid</artifactId>        </dependency>        <dependency>  <groupId>net.sourceforge.nekohtml</groupId>  <artifactId>nekohtml</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope>        </dependency>        <!--json序列化支持-->        <dependency>  <groupId>com.alibaba</groupId>  <artifactId>fastjson</artifactId>        </dependency>        <dependency>  <groupId>com.google.guava</groupId>  <artifactId>guava</artifactId>        </dependency>        <dependency>  <groupId>com.fasterxml.jackson.core</groupId>  <artifactId>jackson-annotations</artifactId>        </dependency>     </dependencies>     <build>        <finalName>yourproject-common</finalName>        <plugins>  <plugin>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-maven-plugin</artifactId>  </plugin>  <plugin>      <groupId>org.apache.maven.plugins</groupId>      <artifactId>maven-compiler-plugin</artifactId>      <configuration><source>1.7</source><target>1.7</target>      </configuration>  </plugin>        </plugins>    </build> </project>

admin project

 

  

<?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>yourproject-parent</artifactId>        <groupId>com.yourproject</groupId>        <version>1.0-SNAPSHOT</version>        <relativePath>../yourproject-parent/pom.xml</relativePath>    </parent>    <modelVersion>4.0.0</modelVersion>    <groupId>com.yourproject</groupId>    <artifactId>yourproject-admin</artifactId>    <packaging>war</packaging>      <dependencies>        <dependency>  <groupId>com.yourproject</groupId>  <artifactId>yourproject-common</artifactId>  <version>1.0-SNAPSHOT</version>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-web</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-thymeleaf</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope>        </dependency>        <!--热部署-->        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-devtools</artifactId>  <optional>true</optional>        </dependency>        <dependency>  <groupId>org.apache.shiro</groupId>  <artifactId>shiro-spring</artifactId>        </dependency>        <dependency>  <groupId>org.apache.shiro</groupId>  <artifactId>shiro-web</artifactId>        </dependency>        <dependency>  <groupId>org.apache.shiro</groupId>  <artifactId>shiro-ehcache</artifactId>        </dependency>        <dependency>  <groupId>com.github.theborakompanioni</groupId>  <artifactId>thymeleaf-extras-shiro</artifactId>        </dependency>        <!--redis缓存shiro-->        <dependency>  <groupId>org.crazycake</groupId>  <artifactId>shiro-redis</artifactId>        </dependency>     </dependencies>    <build>        <plugins>  <plugin>      <groupId>org.springframework.boot</groupId>      <artifactId>spring-boot-maven-plugin</artifactId>      <configuration><fork>true</fork>      </configuration>  </plugin>        </plugins>    </build> </project>

portal project

 

  

<?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>yourproject-parent</artifactId>        <groupId>com.yourproject</groupId>        <version>1.0-SNAPSHOT</version>        <relativePath>../yourproject-parent/pom.xml</relativePath>    </parent>     <modelVersion>4.0.0</modelVersion>    <groupId>com.yourproject</groupId>    <artifactId>yourproject-portal</artifactId>    <packaging>war</packaging>     <dependencies>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-web</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-thymeleaf</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope>        </dependency>         <dependency>  <groupId>net.sourceforge.nekohtml</groupId>  <artifactId>nekohtml</artifactId>  <version>1.9.15</version>        </dependency>        <!-- httpclient -->        <dependency>  <groupId>org.apache.httpcomponents</groupId>  <artifactId>httpclient</artifactId>        </dependency>    </dependencies> </project>

rest project

 

  

<?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>yourproject-parent</artifactId>        <groupId>com.yourproject</groupId>        <version>1.0-SNAPSHOT</version>        <relativePath>../yourproject-parent/pom.xml</relativePath>    </parent>     <modelVersion>4.0.0</modelVersion>    <groupId>com.yourproject</groupId>    <artifactId>yourproject-rest</artifactId>    <packaging>war</packaging>     <dependencies>     <dependency>        <groupId>com.yourproject</groupId>        <artifactId>yourproject-common</artifactId>        <version>1.0-SNAPSHOT</version>    </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-web</artifactId>        </dependency>        <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope>        </dependency>        &a      

	  
	  
	  
	  
	  
	  
        

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: