BeanNotOfRequiredTypeException due to autowired fields

Somewhere in your code you must be autowiring AdminServiceImpl like this:

@Autowired
private AdminServiceImpl adminService;

Either depend barely on interface:

@Autowired
private AdminService adminService;

or enabled CGLIB proxies.

Similar problems

  • Autowired spring bean is not a proxy
  • Fixing BeanNotOfRequiredTypeException on Spring proxy cast on a non-singleton bean?
  • Getting Spring Error “Bean named ‘x’ must be of type [y], but was actually of type [$Proxy]” in Jenkins
  • Original interface is lost in Spring AOP introduction

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)