第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

web.xml文件:

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"

? ? ? ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

? ? ? ? xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"

? ? ? ? version="3.1">

? ?<filter>

? ? ? ?<filter-name>shiroFilter</filter-name>

? ? ? ?<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>

? ? <async-supported>true</async-supported>

? ? <init-param>

? ? <param-name>targetFilterLifecycle</param-name>

? ? <param-value>true</param-value>

? ? </init-param>

? ?</filter>

? ?<filter-mapping>

? ? ? ?<filter-name>shiroFilter</filter-name>

? ? ? ?<url-pattern>/*</url-pattern>

? ?</filter-mapping>


? ?<context-param>

? ? ? ?<param-name>contextConfigLocation</param-name>

? ? ? ?<param-value>

? ? ? ? classpath:spring/spring.xml

? ? ? ?</param-value>

? ?</context-param>

? ?<listener>

? ? ? ?<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

? ?</listener>


? ?<servlet>

? ? ? ?<servlet-name>DispatcherServlet</servlet-name>

? ? ? ?<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

? ? ? ?<init-param>

? ? ? ? ? ?<param-name>contextConfigLocation</param-name>

? ? ? ? ? ?<param-value>classpath:spring/springmvc.xml</param-value>

? ? ? ?</init-param>

? ? ? ?<load-on-startup>1</load-on-startup>

? ? ? ?<async-supported>true</async-supported>

? ?</servlet>


? ?<servlet-mapping>

? ? ? ?<servlet-name>DispatcherServlet</servlet-name>

? ? ? ?<url-pattern>/</url-pattern>

? ?</servlet-mapping>


? ?<!-- 注冊spring提供的針對POST請求的中文亂碼問題 -->

? ?<filter>

? ? ? ?<filter-name>CharacterEncodingFilter</filter-name>

? ? ? ?<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>

? ? ? ?<init-param>

? ? ? ? ? ?<param-name>encoding</param-name>

? ? ? ? ? ?<param-value>UTF-8</param-value>

? ? ? ?</init-param>

? ?</filter>

? ?<filter-mapping>

? ? ? ?<filter-name>CharacterEncodingFilter</filter-name>

? ? ? ?<url-pattern>/*</url-pattern>

? ?</filter-mapping>

</web-app>

spring.xml文件:

<?xml version="1.0" encoding="UTF-8"?>

<beans

xmlns="http://www.springframework.org/schema/beans"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://www.springframework.org/schema/beans?

http://www.springframework.org/schema/beans/spring-beans-4.1.xsd">

<bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">

<property name="securityManager" ref="securityManager"/>

<property name="loginUrl" value="/login.html" />

<property name="unauthorizedUrl" value="/403.html"/>

<property name="filterChainDefinitions">

<value>

/login.html = anon

/subLogin = anon

/* = authc

</value>

</property>

</bean>

<bean class="org.apache.shiro.web.mgt.DefaultWebSecurityManager" id="securityManager">

<property name="realm" ref="realm"/>

</bean>

<bean class="com.tckj.shiro.CustomRealm" id="realm">

<property name="credentialsMatcher" ref="credentialsMatcher"/>

</bean>

<bean class="org.apache.shiro.authc.credential.HashedCredentialsMatcher" id="credentialsMatcher">

<property name="hashAlgorithmName" value="md5"/>

<property name="hashIterations" value="1"></property>

</bean>

</beans>


正在回答

1 回答

spring 配置文件中Beanfactory找不到或者沒有初始化

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext

我要回答 關(guān)注問題
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號