मैं अपने वसंत + हाइबरनेट + वसंत-सुरक्षा और टाइल्स 2 - "हैलोवर्ल्ड" एप्लिकेशन को this guide (दुर्भाग्य से जर्मन में) के बाद काम करने की कोशिश कर रहा हूं।j_spring_security_check 404 अंक
मेरी समस्या यह है कि मुझे अपने आवेदन में लॉग इन करते समय त्रुटि संदेश "404" मिलता है। लॉगिन पेज के लिए पुनर्निर्देशन इरादे के रूप में काम करता है, लेकिन जब मैं लॉगिन बटन दबाता हूं तो मैं "http://localhost:8080/App/j_spring_security_check" तक नहीं पहुंच सकता।
मेरे web.xml इस तरह दिखता है:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/defs/applicationContext.xml
/WEB-INF/defs/applicationContext-security.xml
</param-value>
</context-param>
<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>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
और applicationContext-security.xml फ़ाइल इस तरह से लग रहा है ...
<http use-expressions="true">
<intercept-url pattern="/index.html" access="permitAll" />
<intercept-url pattern="/timeout.html" access="permitAll" />
<intercept-url pattern="/redirect.html" access="permitAll" />
<intercept-url pattern="/media/**" access="permitAll" />
<intercept-url pattern="/includes/**" access="permitAll" />
<intercept-url pattern="/office/**" access="hasRole('ROLE_USER')" />
<intercept-url pattern="/office/admin/**" access="hasRole('ROLE_ADMIN')" />
<form-login login-page="/index.html"
authentication-failure-url="/index.html?login_error=1"
default-target-url='/office/kunden.html'
always-use-default-target='true'
/>
<logout logout-success-url="/index.html" />
<remember-me />
<session-management invalid-session-url="/index.html">
<concurrency-control max-sessions="2" error-if-maximum-exceeded="true" />
</session-management>
</http>
<authentication-manager>
<authentication-provider>
<jdbc-user-service data-source-ref="mysqldataSource"
authorities-by-username-query="select username, authority from benutzer where username = ?"
users-by-username-query="select username, password, enabled from benutzer where username = ?"/>
</authentication-provider>
</authentication-manager>
डेटाबेस कनेक्शन भला हो रहा है
अगर कोई मुझे उस पर संकेत दे सकता है तो मुझे बहुत खुशी होगी क्योंकि मैंने पहले से ही बहुत कुछ किया है, लेकिन अभी तक कोई समाधान नहीं मिला है।
मैं वसंत 3.1 और बिल्ला 7.0.23
क्या आपका मतलब है "j_security_check" या "j_spring_security_check"? आपके पास दोनों हैं ... –
क्षमा करें, यह j_spring_security_check – xSNRG
उस अनुरोध के लिए डीबग लॉग आउटपुट की जांच करें और देखें कि स्प्रिंग सिक्योरिटी इसे संसाधित करने के बारे में क्या कहती है। आपको फ़िल्टर श्रृंखला के माध्यम से अपने मार्ग की एक विस्तृत रिपोर्ट देखना चाहिए। –