If a Service class is annotated with the Validated annotation, then the same class cannot autowire itself.
@Service
@Validated
public class SomeService {
@Au
The annotation @Validated
has nothing to do with the incorrect autowiring in this case. Read the error properly and you find out what is wrong. The first line is self-describing:
Error creating bean with name 'someService': Bean with name 'someService' has been injected into other beans [someService] 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.
You autowire the very same service into itself which causes the endless circular bean wiring. A solution? Don't design beans like that. If you are really restricted to this design, use either:
@Lazy
or @PostConstruct
annotationsMore about this issue at Baeldung's webpage: https://www.baeldung.com/circular-dependencies-in-spring