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

新建项目 恢复服务报错 No qualifying bean of type 'xxx.xxx' available #55

Open
aladingDenson opened this issue Mar 26, 2019 · 4 comments

Comments

@aladingDenson
Copy link

现有两种情况可供作者分析
第一种:myth框架的demo正常,可恢复。 在我原来的项目中(非myth目录),添加myth框架支持。
尝试启动eureka,myth-demo-springcloud-account,myth-demo-springcloud-inventory, 我自己的项目(做为消费者远程调用account,inventory服务),一切正常,包括停掉account或者inventory服务,重启恢复也正常
第二种:将account服务复制拷贝一份到我的项目下,目前只修改了pom文件的parent,正常流程是通的,消息恢复服务 依然不通,account复制服务消费消息恢复时 依旧报错No qualifying bean of type 'xxx.xxx' available
希望作者早点看到,我在QQ群里

@yu199195
Copy link
Member

这个bean 没注册到spring 里面

@aladingDenson
Copy link
Author

群主我这边已经解决了,问题告知

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>

这个依赖模块由于实时监控类的启动,会造成bean的获取有问题
另外项目中配置文件中 不要含有spring.devtools.restart 这个是监听目录改变后重启

@yu199195
Copy link
Member

nice

@baibuxiha
Copy link

设置springboot devtools属性解决
####序列化 反序列化 使用RestartClassLoader###
restart.include.kryo=/kryo-shaded-[\w.-]+.jar
####myth 开发环境 使用RestartClassLoader ##
restart.include.myth-common=/myth-common-[\w.-]+.jar
restart.include.myth-core=/myth-core-[\w.-]+.jar
restart.include.myth-annotation=/myth-annotation-[\w.-]+.jar
restart.include.myth-springcloud=/myth-springcloud-[\w.-]+.jar
restart.include.myth-starter=/myth-spring-boot-starter-[\w.-]+.jar

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