Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
UnsatisfiedDependencyException: Error creating bean with name 'myController'

I am calling a service class: "CustomUserService" from MyController.

 public class MyController{


  private final CustomUserService userService;

  @Autowired
  public MyController(
      CustomUserService userService) {
      this.userService = userService;
  }

The userService is as follows:

    @Service 
public class CustomUserService implements ICustomUserService { 
           @Autowired   public CustomUserService(SpringAuthClientCustom authClient){
              this.authClient = authClient;   } }

My authClient is:

@Service
public class SpringAuthClientCustom extends AbstractCustomSpringClient  {
}

which extends: public abstract class AbstractCustomSpringClient {}

AbstractCustomSpringClient is from the external jar and I have added that to my dependency.

Now, I am getting

Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SpringAuthClientCustom' defined in file [C:\Users..\SpringAuthClientCustom.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.**..AbstractCustomSpringClient ] from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@1d44bcfa]

I have added scanBasePackages in the BootAplication:

@SpringBootApplication(
    scanBasePackages = { ""com.externalJar.client.*"}

Still, spring is not able to resolve the dependency. What could be the possible reason? Is it because of the AbstractCustomSpringClient class outside my project ( in the jar) and not defined as @Service?

Thanks

over 4 years ago · Santiago Trujillo
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda