Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在此工程中pom文件引入spring-boot-starter-parent后起冲突的问题 #10

Closed
MissThee opened this issue Feb 22, 2018 · 3 comments

Comments

@MissThee
Copy link

在pom文件中加入以下依赖

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
</parent>
<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.44</version>
</dependency>

返回全部变成404

{
    "timestamp": 1519257821400,
    "status": 404,
    "error": "Not Found",
    "message": "No message available",
    "path": "/require_role"
}

后来发现把

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.8.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
</parent>

去掉就会正常。

或者保留spring-boot-starter-parent,把spring-boot-starter-data-jpa去掉也会正常,但不知道为什么会这样???

@Smith-Cruise
Copy link
Owner

难道应用启动的时候一个错都不报吗?

@zhuyaoyao2014
Copy link

事务注解不能用了,启动报错

@Smith-Cruise
Copy link
Owner

把错误贴出来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants