We have a Spring MVC application. We now have to integrate spring security in it.
The authentication can be done using either database or using LDAP.
We will a have a configuration setting either in a properties file or a database to decide which authentication to use i.e. if the user should be authenticated against a database or a LDAP.
At any given time there will be only one type of authentication.
e.g. A company test1 can have a database authentication and another company test 2 can have ldap authentication.
Some ideas:
-Dmyprop=foo
(o some other way) when starting up the app. Then, in your Spring config, include the appropriate config file using${myprop}
so that the correct file is called and used.