Play--framework-Spring-module icon indicating copy to clipboard operation
Play--framework-Spring-module copied to clipboard

Scanning and annotations not working

Open Vortilion opened this issue 12 years ago • 1 comments

Hi,

I'm trying to use spring in a Play 1 project, together with the ldap library. So far it works, but only if I use @Inject for injecting two Beans "ldapTemplate" and "ldapPerson". I added the lines

play.spring.component-scan=true play.spring.component-scan.base-packages=ldap.dao

in application.conf, but it seems they're not making any difference. If I change @Inject to "@Autowired" e.g. I get a NullPointer Exception in the code

Security.ldap.authenticate(DistinguishedName.EMPTY_PATH, filter.encode(), password)

Vortilion avatar Jul 12 '13 12:07 Vortilion

need to define static @Inject private static HelloService helloService;

xiejunquan avatar Apr 12 '16 09:04 xiejunquan