java - pom.xml 和依赖版本的问题
问题描述
我的pom.xml
. 一旦我使用该版本,1.5.9.RELEASE
一切都很好twitter
dependency
。但是缺少要设置的文件netflix eureka
和discovery
. 当我将版本更改为时,2.0.0.RELEASE
我在为我的twitter
依赖项查找文件时遇到问题。新版本springboot
不支持twitter
了吗?
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>de.de</groupId>
<artifactId>twitter</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>twitterapp</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>//<version>2.0.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-twitter</artifactId>
</dependency>
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
<version>4.0.6</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.M9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>
解决方案
推荐阅读
- python - 将 0 添加到 Project Euler 问题 23“Non-Abundant Sums”的列表中会改变答案
- c - 如何在 C 中编译一个简单的 MLT 示例?
- asp.net-core - DotNet Core 依赖注入多个项目
- html - 围绕可变高度的 div 画一个完美的圆圈
- python - 如何通过python更改与一维数组匹配的矩阵中的值
- android - 无法在 androidX 的 recyclerview 中初始化原生广告
- c# - c# - 如何在不通过winform关闭应用程序的情况下关闭控制台?
- android - 减小标记可点击半径
- c# - 在 C# 列表中如何查找重复项并添加属性值?
- python - Flask 应用循环依赖