首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Spring Boot与Spring HATEOAS Maven冲突

Spring Boot与Spring HATEOAS Maven冲突
EN

Stack Overflow用户
提问于 2014-06-26 12:26:31
回答 1查看 1.2K关注 0票数 0

似乎当我添加spring-hateoas的依赖项时

代码语言:javascript
复制
<groupId>org.springframework.hateoas</groupId>
    <artifactId>spring-hateoas</artifactId>
    <version>0.13.0.RELEASE</version>

以下类在类路径中不再可用

代码语言:javascript
复制
org.springframework.web.bind.annotation.RestController;

我试图排除spring-hateoas的各种依赖项,但应用程序不再运行。

有没有人有幸在春天的鞋子里穿着春天的仇恨。

EN

回答 1

Stack Overflow用户

发布于 2014-06-26 16:11:58

绝对没有任何问题。@RestController注释仍然可用,您不需要做任何排除。

如果有帮助,我目前使用的是Spring Boot的1.0.2版本:

代码语言:javascript
复制
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.0.2.RELEASE</version>
</parent>

spring-boot-starter-web提供了@RestController

代码语言:javascript
复制
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

我没有在我的pom.xml中为spring-hateoas定义一个显式版本,但是我的构建引入了0.9.0.RELEASE

代码语言:javascript
复制
<dependency>
    <groupId>org.springframework.hateoas</groupId>
    <artifactId>spring-hateoas</artifactId>
</dependency>

顺便说一下,我可以从Eclipse POM编辑器中看到,Spring HATEOAS正在定义对Spring 3.2.7的依赖关系。但是,spring-boot-starter-parent项目管理4.0.3之前的版本。你能看到你得到的是什么版本的Spring吗?您是否没有将spring-boot-parent用作父项目?

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24422371

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档