How to move username/passwords out of spring-security-context.xml?

前端 未结 6 1429
一个人的身影
一个人的身影 2020-12-16 23:01

I am using Spring Security in one of my project. The web-app requires the user to login. Hence I have added few usernames and passwords in the spring-security-context.xml fi

6条回答
  •  情话喂你
    2020-12-16 23:36

    You can use the PropertyPlaceholderConfigurer - put them in properties file and then reference them using EL:

    http://static.springsource.org/spring/docs/3.1.x/spring-framework-reference/html/beans.html#beans-factory-placeholderconfigurer

提交回复
热议问题