spring 循环注入circular reference 最简单的处理方式

Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'sersonServiceImpl': Bean with name 'sersonServiceImpl' has been injected into other beans [sorkerServiceImpl] in its raw version as part of a circular reference, but has eventually been wrapped. This means that said other beans do not use the final version of the bean. This is often the result of over-eager type matching - consider using 'getBeanNamesOfType' with the 'allowEagerInit' flag turned off, for example.
        @Lazy
	@Autowired(required = false)
	private SersPersonService sersPersonService;

加个Lazy

你可能感兴趣的:(spring 循环注入circular reference 最简单的处理方式)