Cześć wam.
Potrzebuję żeby ktoś kto ma czas popatrzył na moją konfigurację spring security. Dopiero się zapoznaję ze spring security ze strony Mkyong i jest to najprostszy program jaki może być, ale nie mogę zidentyfikować problemu. Nie wiem czy kłopot może być w zależnościach mavena czy gdzie indziej.
Tutaj jest web.xml
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/root-context.xml</param-value>
</context-param>
<servlet>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/appServlet/servlet-context.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- Spring Security -->
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
spring-security.xml
<http auto-config="true">
<intercept-url pattern="/admin**" access="ROLE_USER" />
</http>
<authentication-manager>
<authentication-provider>
<user-service>
<user name="pawlus" password="qwert" authorities="ROLE_USER" />
</user-service>
</authentication-provider>
</authentication-manager>
To chyba jeden z błędów jaki wywala ( nie radze sobie z tymi logami w eclipse ). Jak programowałem w C++ przy pomocy Visual Studio to nigdy nie miałem problemu z odczytaniem problemu. Tzn. wiem o co mu chodzi ale nie wiem czemu.
SEVERE: Exception starting filter springSecurityFilterChain
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined