Конфигурирах един пролетен контекст за сигурност за моя проект, като използвам intecept-url, мога да удостоверя всички URL адреси, но когато предам някакъв идентификатор през URL, удостоверяването не се случва.
<intercept-url pattern="/**" access="isAuthenticated()"/>
Работещи URL адреси
http://localhost:8080/WEB/add-employee
http://localhost:8080/WEB/view-employee
Неработещи URL адреси
http://localhost:8080/WEB/edit-employee/1
http://localhost:8080/WEB/edit-employee/2
1 и 2 са идентификаторът, който предавам през URL, горните URL модели не работят (това означава, че когато предавам идентификатор през URL)
И аз опитах много комбинации в intercept-url, но не получавам правилния резултат.
<http use-expressions="true">
<intercept-url pattern="/**" access="isAuthenticated()"/> <!-- this means all URL in this app will be checked if user is authenticated -->
<!-- We will just use the built-in form login page in Spring -->
<form-login login-page="/" login-processing-url="/j_spring_security_check" default-target-url="/home" authentication-failure-url="/"/>
<logout logout-url="/logout" logout-success-url="/"/> <!-- the logout url we will use in JSP -->
</http>