Guest User

Untitled

a guest
Dec 10th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
  5. http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  6.  
  7. <!-- The definition of the Root Spring Container shared by all Servlets
  8. and Filters -->
  9. <context-param>
  10. <param-name>contextConfigLocation</param-name>
  11. <param-value>/WEB-INF/spring/root-context.xml</param-value>
  12. </context-param>
  13.  
  14. <!-- Creates the Spring Container shared by all Servlets and Filters -->
  15. <listener>
  16. <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
  17. </listener>
  18.  
  19. <!-- Processes application requests -->
  20. <servlet>
  21. <servlet-name>appServlet</servlet-name>
  22. <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
  23. <init-param>
  24. <param-name>contextConfigLocation</param-name>
  25. <param-value>
  26. /WEB-INF/spring/appServlet/servlet-context.xml
  27. </param-value>
  28. </init-param>
  29. <load-on-startup>1</load-on-startup>
  30. </servlet>
  31. <servlet-mapping>
  32. <servlet-name>appServlet</servlet-name>
  33. <url-pattern>/</url-pattern>
  34. </servlet-mapping>
  35.  
  36. <mime-mapping>
  37. <extension>js</extension>
  38. <mime-type>application/x-javascript</mime-type>
  39. </mime-mapping>
  40. <mime-mapping>
  41. <extension>properties</extension>
  42. <mime-type>application/text</mime-type>
  43. </mime-mapping>
  44. <mime-mapping>
  45. <extension>xml</extension>
  46. <mime-type>application/xml</mime-type>
  47. </mime-mapping>
  48.  
  49. <!-- Enables Security -->
  50. <!-- <listener> <listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
  51. </listener> <filter> <filter-name>monitoring</filter-name> <filter-class>net.bull.javamelody.MonitoringFilter</filter-class>
  52. </filter> <filter-mapping> <filter-name>monitoring</filter-name> <url-pattern>/*</url-pattern>
  53. </filter-mapping> <filter> <filter-name>springSecurityFilterChain</filter-name>
  54. <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
  55. </filter> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name>
  56. <url-pattern>/*</url-pattern> </filter-mapping> -->
  57.  
  58.  
  59. </web-app>
  60.  
  61. <?xml version="1.0" encoding="UTF-8"?>
  62. <beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  63. xmlns:beans="http://www.springframework.org/schema/beans" xmlns:aop="http://www.springframework.org/schema/aop"
  64. xmlns:util="http://www.springframework.org/schema/util" xmlns:context="http://www.springframework.org/schema/context"
  65. xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
  66. <!-- <beans:bean id="placeholderConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  67. <beans:property name="location" value="classpath:resources.properties"> </beans:property>
  68. </beans:bean> -->
  69. <beans:import
  70. resource="classpath:/META-INF/spring/appServlet/servlet-security.xml" />
  71. </beans:beans>
  72.  
  73. <?xml version="1.0" encoding="UTF-8"?>
  74. <beans:beans xmlns="http://www.springframework.org/schema/security"
  75.     xmlns:beans="http://www.springframework.org/schema/beans"
  76.     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  77.     xsi:schemaLocation="http://www.springframework.org/schema/beans
  78. http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
  79. http://www.springframework.org/schema/security
  80. http://www.springframework.org/schema/security/spring-security-3.0.3.xsd">
  81.  
  82.     <http auto-config="true"  use-expressions="true">
  83.         <intercept-url pattern="/login" access="permitAll" />
  84.         <intercept-url pattern="/logout" access="permitAll" />
  85.         <intercept-url pattern="/accessdenied" access="permitAll" />
  86.         <intercept-url pattern="/**" access="hasRole('ROLE_USER')" />
  87.         <form-login login-page="/login" default-target-url="/list" authentication-failure-url="/accessdenied" />
  88.         <logout logout-success-url="/logout" />
  89.     </http>
  90.  
  91.     <authentication-manager alias="authenticationManager">
  92.         <authentication-provider>
  93.             <user-service>
  94.                 <user name="vitorn" password="password1" authorities="ROLE_USER" />
  95.             </user-service>
  96.         </authentication-provider>
  97.     </authentication-manager>
  98. </beans:beans>
  99.  
  100. INFO : org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [META-INF/spring/appServlet/servlet-security.xml]
  101. ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
  102. org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:/META-INF/spring/appServlet/servlet-security.xml]
  103. Offending resource: ServletContext resource [/WEB-INF/spring/root-context.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/spring/appServlet/servlet-security.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/spring/appServlet/servlet-security.xml] cannot be opened because it does not exist
  104. at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68)
  105.  
  106. <beans:import
  107. resource="classpath:/spring/appServlet/servlet-security.xml" />
Add Comment
Please, Sign In to add comment