dji-sdk / DJI-Cloud-API-Demo

MIT License
112 stars 84 forks source link

循环依赖 #36

Closed pigeon2049 closed 9 months ago

pigeon2049 commented 10 months ago

Description:

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

drcController (field private com.dji.sample.control.service.IDrcService com.dji.sample.control.controller.DrcController.drcService) ┌─────┐ | drcServiceImpl defined in file [\target\classes\com\dji\sample\control\service\impl\DrcServiceImpl.class] ↑ ↓ | waylineJobServiceImpl (field private com.dji.sample.control.service.IDrcService com.dji.sample.wayline.service.impl.WaylineJobServiceImpl.drcService) └─────┘

Action:

Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.

DJIsean commented 9 months ago

https://github.com/dji-sdk/DJI-Cloud-API-Demo/commit/d68e3d3eaea8b387de9760472e6ff730633bf805