sshd-shell-spring-boot icon indicating copy to clipboard operation
sshd-shell-spring-boot copied to clipboard

Circular dependecy when importing the library

Open brandonfl opened this issue 3 years ago • 3 comments

We can not use the library with Spring 2.6.2 cause of circular references

To Reproduce

  1. Import the lib
  2. Run your project

Expected behavior It should run without errors

Actual behavior

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

Description:

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

┌──->──┐
|  sshdServerConfiguration
└──<-──┘

Capture d’écran de 2022-01-17 17-41-28

Additional context springframework version 2.6.2

brandonfl avatar Jan 17 '22 16:01 brandonfl

I have the same problem

ttimot24 avatar Feb 08 '22 10:02 ttimot24

Please add the following property and let me know if it works: spring.main.allow-circular-references=true It's a temporary fix while I try to figure out what's going on under the hood.

anand1st avatar Feb 08 '22 14:02 anand1st

@anand1st The issue come from spring-shell :

Into the release 2.1.0-M1 you can see :

Re-work to remove bean cycles which caused issues with boot 2.6.x.

https://github.com/spring-projects/spring-shell/releases/tag/v2.1.0-M1

brandonfl avatar Feb 14 '22 11:02 brandonfl