spring-ldap icon indicating copy to clipboard operation
spring-ldap copied to clipboard

How to load spring-ldap.xml beans without web.xml

Open kevinbheda opened this issue 11 years ago • 0 comments
trafficstars

Hi I'm creating simple user managment system with spring web-mvc + spring-ldap. Luckily the sample project is available ( https://github.com/spring-projects/spring-ldap/tree/master/samples/user-admin ) for my task. It references spring-ldap.xml in web.xml

But there are some issues. I'm following this sample for web-rest UI project (http://spring.io/guides/gs/rest-service/) but the page mentions that there is no need for web.xml. So can you suggest me a way to load beans and autowire them from spring-ldap.xm l without web.xml. Currently I'm loading "LdapTemplate" at many places by repeating my code. 'context = new ClassPathXmlApplicationContext("springldap.xml"); ldapTemplate = (LdapTemplate) context.getBean("ldapTemplate");'

kevinbheda avatar Nov 15 '14 10:11 kevinbheda