मैं बाल संदर्भ में वसंत सुरक्षा संदर्भ रखने की कोशिश कर रहा हूं, इसलिए मुझे सर्वलेट संदर्भ फ़ाइल पर यूआरएल सुरक्षा हो सकती है।बाल संदर्भ में वसंत सुरक्षा संदर्भ कैसे प्राप्त करें
मेरे पास है:
<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>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/spring-security.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>myapp-soap</servlet-name>
<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
<init-param>
<param-name>transformWsdlLocations</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
web.xml, वसंत-security.xml पर सामान्य सुरक्षा विन्यास पर और
<!-- Authorization configurations -->
<security:http auto-config="false" use-expressions="true"
create-session="never"
authentication-manager-ref="authenticationManager"
entry-point-ref="authenticationEntryPoint">
<security:custom-filter
position="PRE_AUTH_FILTER" ref="serviceAuthenticationFilter"/>
<security:intercept-url
pattern="/GetForbiddenUrl" access="hasRole('roleThatDoesntExist')" />
<security:intercept-url pattern="/**" access="permitAll" />
</security:http>
<!-- annotation security -->
<security:global-method-security pre-post-annotations="enabled"/>
MyApp-साबुन servlet.xml पर
। यह काम नहीं करता है, लेकिन
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/my-app/v1/soap]] (ServerService Thread Pool -- 192) JBWEB000284: Exception starting filter springSecurityFilterChain:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'springSecurityFilterChain' is defined
के साथ विफल हालांकि, अगर मैं वसंत-सुरक्षा जड़ संदर्भ विन्यास को <security:http>
हिस्सा ले जाते हैं, सब कुछ काम करता है। क्या मैं कोशिश करने के तरीके को काम नहीं करना चाहिए? मैं अपने बच्चे के संदर्भ में यूआरएल-आधारित सुरक्षा कैसे प्राप्त कर सकता हूं?
मैंने संदर्भ फ़ाइलों को एक में जोड़ने का भी प्रयास किया, लेकिन एक ही समस्या उत्पन्न होती है।
आप सुनिश्चित करें कि आपके वसंत-security.xml वसंत द्वारा उठाया जाता है कर रहे हैं "कैसे बच्चे को संदर्भ के रूप में वसंत सुरक्षा संदर्भ के लिए"? –
@MaksymDemidas हाँ, जाने के रूप में 'http' सभी निर्देशों में भाग परिणाम इस्तेमाल किया जा रहा है, दोनों parnt और बच्चे संदर्भ में – eis