***************************
APPLICATION FAILED TO START
***************************Description:
The dependencies of some of the beans in the application context form a cycle:
testController defined in file [E:\xxx\TestController.class]
┌─────┐
| basicService defined in file [E:\xxx\BasicService.class]
↑ ↓
| mqSendService defined in file [E:\xxx\MqSendService.class]
└─────┘
Disconnected from the target VM, address: '127.0.0.1:59983', transport: 'socket'
也没什么新奇的,随便记录下。
只要把其中一个Service不依赖注入另一个就好了。
假设你是因为想要在ServiceA中调用ServiceB的方法,那就把ServiceB中的那个方法,交给第三方去管理。
然后两个Service就可以和平共处了。