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

启动报循环依赖错误 #84

Open
randeexiong opened this issue Sep 9, 2022 · 7 comments
Open

启动报循环依赖错误 #84

randeexiong opened this issue Sep 9, 2022 · 7 comments

Comments

@randeexiong
Copy link

randeexiong commented Sep 9, 2022

启动会报循环依赖错误

***************************
APPLICATION FAILED TO START
***************************

Description:

The dependencies of some of the beans in the application context form a cycle:

   documentationPluginsBootstrapper defined in URL [jar:file:/D:/tools/java/maven/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]
      ↓
   webMvcRequestHandlerProvider defined in URL [jar:file:/D:/tools/java/maven/repo/io/springfox/springfox-spring-web/2.9.2/springfox-spring-web-2.9.2.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]
      ↓
   org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration (field private java.util.List org.springframework.security.oauth2.config.annotation.web.configuration.AuthorizationServerEndpointsConfiguration.configurers)
┌─────┐
|  org.minbox.framework.api.boot.autoconfigure.oauth.ApiBootAuthorizationMemoryServerAutoConfiguration (field private org.springframework.security.oauth2.provider.token.TokenStore org.minbox.framework.oauth.AuthorizationServerConfiguration.tokenStore)
└─────┘


@hengboy
Copy link
Member

hengboy commented Sep 9, 2022

@randeexiong 把你的pom.xml贴出来

@hengboy
Copy link
Member

hengboy commented Sep 9, 2022

apiboot只提供了依赖,你需要指定项目parent为spring-boot-starter-parent的原因不仅是依赖还有其他的配置,比如:项目打包

@randeexiong
Copy link
Author

<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <modules>
        <module>cbrc-log-server</module>
        <module>cbrc-statement-verify-services</module>
    </modules>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.7.0</version>
    </parent>
    <groupId>com.boczj</groupId>
    <artifactId>api-boot-cbrc</artifactId>
    <version>0.1.0.RELEASE</version>
    <name>api-boot-cbrc</name>
    <properties>
        <java.version>1.8</java.version>
        <api.boot.version>2.3.7</api.boot.version>
        <hutool.version>5.8.5</hutool.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <!--ApiBoot统一版本依赖-->
            <!--版本依赖详细介绍:http://apiboot.minbox.io/zh-cn/docs/version-rely.html-->
            <dependency>
                <groupId>org.minbox.framework</groupId>
                <artifactId>api-boot-dependencies</artifactId>
                <version>${api.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

@hengboy
Copy link
Member

hengboy commented Sep 9, 2022

只有这些吗?你这应该是parent项目的pom.xml,你启动的是哪个module?

@randeexiong
Copy link
Author

出错问题代码我已上传 github,请查看,谢谢

https://github.com/xiungfi/api-boot-cbrc.git

@hengboy
Copy link
Member

hengboy commented Sep 9, 2022

你可以看下我的博客:https://blog.minbox.org/

@randeexiong
Copy link
Author

randeexiong commented Sep 9, 2022

你可以看下我的博客:https://blog.minbox.org/

api-boot-starter-security-oauth-jwt 导致的循环依赖bug,在您博客没看到说有对这个bug的的处理方案

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

2 participants