Using Method based Security
Scenario: Only an account holder can deposit or withdraw money. Only an employee can charge fees to the account, and only a manager can allow overdraft on an account.
———————————————————————
Modify WEB-INF/applicationContext-security.xml by adding the following line under the root element:
<global-method-security secured-annotations=”enabled” />
———————————————————————
Create a new xml called WEB-INF/applicationContext-security.xml which is mentioned in web.xml
———————————————————————
Use terminal to go the root of the project, and type:
ant deploy
This will deploy the web application to the tomcat server and available at http://localhost:8080/springacldemo
The error logs will be available at $CATALINA_HOME/logs/Catalina.out and $CATALINA_HOME/logs/localhost.yyyy-mm-dd.log
Leave a comment