ssm使用shiro启动报错 5C

报错内容
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginRealm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.warehouse.service.UserLogingService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency.

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.warehouse.service.UserLogingService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}

shiro.xml配置

    <!-- 配置Shiro核心Filter  --> 
    <bean id="shiroFilter" class="org.apache.shiro.spring.web.ShiroFilterFactoryBean">
        <!-- 安全管理器 -->
        <property name="securityManager" ref="securityManager" />
        <!-- 未认证,跳转到哪个页面 -->
        <property name="loginUrl" value="/login.html" />
        <!-- 登陆成功页面 -->
        <property name="successUrl" value="/index.html" />
        <!-- 认证后,没有权限跳转页面 -->
        <property name="unauthorizedUrl" value="/unauthorized.html" />

        <property name="filterChainDefinitions">
            <value>
                /WEB-INF/views/login.html* = anon
                /loging.do* = anon
                /WEB-INF/llb/* = anon
                /res/** = anon
                /** = authc
            </value>
        </property>
    </bean>

    <!-- 配置Realm -->
    <bean id="loginRealm" class="com.warehouse.service.LoginRealm">
    </bean>

    <!-- 安全管理器  -->
    <bean id="securityManager" 
        class="org.apache.shiro.web.mgt.DefaultWebSecurityManager">
        <property name="realm" ref="loginRealm" />
        <!-- <property name="cacheManager" ref="shiroCacheManager" /> -->
    </bean>

    <bean id="lifecycleBeanPostProcessor"
        class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>

applicationContext.xml配置

applicationContext.xml配置
 <import resource="applicationContext-shiro.xml"/>

    <!-- 开启定时任务 -->
    <task:annotation-driven />

    <!-- MyBatis配置 -->
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
        <property name="dataSource" ref="dataSource" />
        <!-- 显式指定Mapper文件位置 -->
        <property name="mapperLocations" value="classpath*:/mybatis/*Mapper.xml" />
        <!-- mybatis配置文件路径 -->
        <property name="configLocation" value="classpath:/mybatis-config.xml" />
        <property name="typeHandlersPackage" value="package com.warehouse.util" />
    </bean>

    <bean id="sqlSessionTemplate" class="org.mybatis.spring.SqlSessionTemplate">
        <constructor-arg index="0" ref="sqlSessionFactory" />
        <!-- 这个执行器会批量执行更新语句, 还有SIMPLE 和 REUSE -->
        <!-- <constructor-arg index="1" value="BATCH"/> -->
    </bean>
    <!-- 扫描basePackage接口 -->
    <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
        <!-- 映射器接口文件的包路径, -->
        <property name="basePackage" value="com.warehouse.dao" />

    </bean>
    <!-- 使用annotation定义事务 -->
    <bean id="transactionManager"
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource"></property>
    </bean>

    <tx:annotation-driven transaction-manager="transactionManager"
        proxy-target-class="true" />

    <!-- 数据源配置, 使用Tomcat JDBC连接池 -->
    <bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"
        destroy-method="close">
        <!-- Connection Info -->
        <property name="driverClassName" value="${jdbc.driver}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
        <!-- Connection Pooling Info -->
        <property name="maxActive" value="${jdbc.pool.maxActive}" />
        <property name="maxIdle" value="${jdbc.pool.maxIdle}" />
        <property name="minIdle" value="0" />
        <property name="defaultAutoCommit" value="false" />
    </bean>

    <!-- production环境 -->
    <beans profile="production">
        <context:property-placeholder
            ignore-unresolvable="true" file-encoding="utf-8"
            location="classpath:config.properties,classpath:jdbc.properties" />
    </beans>

springMVC.xml配置

 <context:component-scan base-package="com.warehouse.*" />
    <!--jsp可以不用添加这个 如果修改成html就必须用这个 -->
    <mvc:default-servlet-handler />
    <mvc:annotation-driven />
    <!--上面这个是为了html可以用 -->
    <bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
                <ref bean="mappingJacksonHttpMessageConverter" />
            </list>
        </property>
    </bean>

    <!--模板 -->
    <bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
                <ref bean="mappingJacksonHttpMessageConverter" />
            </list>
        </property>
    </bean>

    <mvc:resources mapping="/res/**" location="/res/" />

    <bean id="freemarkerConfig"
        class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
        <property name="templateLoaderPath" value="/WEB-INF/views/" />
        <property name="freemarkerSettings">
            <props>
                <prop key="template_update_delay">0</prop>
                <prop key="default_encoding">UTF-8</prop>
                <prop key="number_format">0.##########</prop>
                <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
                <prop key="classic_compatible">true</prop>
                <prop key="template_exception_handler">ignore</prop>
                <prop key="auto_import">ftl/public.ftl as p,ftl/page.ftl as pg
                </prop>
            </props>
        </property>
        <property name="freemarkerVariables">
            <map>
                <entry key="listProduct" value-ref="ProductDiretciv" />
            </map>
        </property>
    </bean>
    <bean id="viewResolver" class="com.warehouse.freemarker.RichFreeMarkerViewResolver">
        <property name="suffix">
            <value>.html</value>
        </property>
        <property name="contentType" value="text/html;charset=UTF-8"></property>
    </bean>

    <bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/views" />
        <property name="suffix" value=".*" />
    </bean>

    <!-- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver" 
        p:prefix="/WEB-INF/views/" p:suffix=".html"/> -->
    <bean
        class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
        <property name="messageConverters">
            <list>
                <ref bean="mappingJacksonHttpMessageConverter" />
            </list>
        </property>
    </bean>
    <bean id="mappingJacksonHttpMessageConverter"
        class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
        <property name="supportedMediaTypes">
            <list>
                <value>text/html;charset=UTF-8</value>
            </list>
        </property>
    </bean>

@Controller
@Scope("prototype")
public class UserLogingController {

@RequestMapping("loging.do")
@ResponseBody
public String loging(ForeginUser fuser) {

    Subject subject = SecurityUtils.getSubject();

    AuthenticationToken token = new UsernamePasswordToken(fuser.getUsername(), fuser.getPassword());
    try {
        subject.login(token);
        return _HTML_INDEX_;
    } catch (AuthenticationException e) {
        e.printStackTrace();
        return _HTML_LOGIN_;
    }

}

}@Controller
@Scope("prototype")
public class UserLogingController {

@RequestMapping("loging.do")
@ResponseBody
public String loging(ForeginUser fuser) {

    Subject subject = SecurityUtils.getSubject();

    AuthenticationToken token = new UsernamePasswordToken(fuser.getUsername(), fuser.getPassword());
    try {
        subject.login(token);
        return _HTML_INDEX_;
    } catch (AuthenticationException e) {
        e.printStackTrace();
        return _HTML_LOGIN_;
    }

}

}


package com.warehouse.realm;

public class LoginRealm extends AuthorizingRealm {
@Resource
private UserLogingService userlogingService;

@Override
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0) {
    return null;
}

@Override
// 认证
protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException {

    UsernamePasswordToken upToken = (UsernamePasswordToken) token;

    ForeginUser resultUser = userlogingService.findByUsername(upToken.getUsername());
    if (resultUser == null) {

        return new SimpleAuthenticationInfo(resultUser, null, getName());
    } else {
        return new SimpleAuthenticationInfo(resultUser, resultUser.getPassword(), getName());
    }

}

}

package com.warehouse.service;
@Service
public class UserLogingServiceImpl implements UserLogingService {
@Resource
private UserLogingMapper userLogingMapeer;

@Override
public ForeginUser checkLoaderInfo(ForeginUser fuser) {
    return userLogingMapeer.findByUser(fuser);
}
@Override
public ForeginUser findByUsername(String username) {
    return userLogingMapeer.findByUsername(username);
}

}

3个回答

你好,刚才根据日志简单了解了一下你的问题,问题应该出现在LoginRealm中,应该是spring注入UserLogingService 失败,
你可以将@Resource注释换成@Autowared,
spring中@Resource注解默认是通过名称注入
而@Autowared默认是通过类型注入的,你可以试试 ( 如果不对,欢迎指正,我是新手...勿喷)

weixin_42374031
徐子楼 @Resource首先通过名称找名字没有在通过类型如果指定了名称就不一样了
大约一年之前 回复

UserLogingService 和 loginRealm 应该是后边这里出现了错误。

com.warehouse.service.UserLogingService注入有问题

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Shiro使用(基于SSM)
一、配置文件 maven配置 &amp;lt;!-- Shiro --&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.apache.shiro&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;shiro-core&amp;lt;/artifactId&amp;gt; &amp;lt;versi...
shiro与ssm整合使用
shiro 简介 Apache Shiro是一个强大而灵活的开源安全框架,它能够干净利落地处理身份认证,授权,企业会话管理和加密 验证用户 对用户执行访问控制,如: 判断用户是否拥有角色admin。判断用户是否拥有访问的权限 在任何环境下使用 Session API。例如CS程序。 可以使用多个用户数据源。例如一个是oracle用户库,另外一个是mysql用户库。 单点登录(SSO)功...
SSM启动报错
错误日志:while loading persisted sessions: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: com.fh.entity.system.Menu java.io.WriteAbortedException: writing aborted; java
shiro tomcat启动报错
2017-12-25 13:11:49,014 INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'springmvc': initialization startedrn2017-12-25 13:11:49,021 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Refreshing WebApplicationContext for namespace 'springmvc-servlet': startup date [Mon Dec 25 13:11:49 CST 2017]; parent: Root WebApplicationContextrn2017-12-25 13:11:49,023 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/springmvc-servlet.xml]rn2017-12-25 13:11:49,290 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] - JSR-330 'javax.inject.Inject' annotation found and supported for autowiringrn2017-12-25 13:11:49,559 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Mapped "[/login.html],methods=[POST],params=[],headers=[],consumes=[],produces=[text/html;charset=utf-8],custom=[]" onto public java.lang.String com.yjy.controller.HomeController.login(com.yjy.entity.User,org.springframework.validation.BindingResult,org.springframework.ui.Model,org.springframework.web.servlet.mvc.support.RedirectAttributes)rn2017-12-25 13:11:49,562 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Mapped "[/user/add.html],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]" onto public java.lang.String com.yjy.controller.UserController.addUser()rn2017-12-25 13:11:49,562 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Mapped "[/user/del.html],methods=[GET],params=[],headers=[],consumes=[],produces=[text/html;charset=utf-8],custom=[]" onto public java.lang.String com.yjy.controller.UserController.deleteUser(java.lang.String)rn2017-12-25 13:11:49,563 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] - Mapped "[/user/edit.html],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]" onto public java.lang.String com.yjy.controller.UserController.updateUser(int)rn2017-12-25 13:11:49,669 INFO [org.hibernate.validator.internal.util.Version] - HV000001: Hibernate Validator 5.1.2.Finalrn2017-12-25 13:11:50,495 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] - Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Mon Dec 25 13:11:49 CST 2017]; parent: Root WebApplicationContextrn2017-12-25 13:11:50,641 INFO [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] - Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Mon Dec 25 13:11:49 CST 2017]; parent: Root WebApplicationContextrn2017-12-25 13:11:50,898 INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'springmvc': initialization completed in 1884 msrn十二月 25, 2017 1:11:50 下午 org.apache.catalina.startup.HostConfig deployWARrn信息: Deployment of web application archive E:\Tomcat 8.0\webapps\SpringMVC_Shiro-1.0-SNAPSHOT.war has finished in 18,159 msrn十二月 25, 2017 1:11:50 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\docsrn十二月 25, 2017 1:11:50 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\docs has finished in 37 msrn十二月 25, 2017 1:11:50 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\dsyn_yjyrn十二月 25, 2017 1:11:54 下午 org.apache.jasper.servlet.TldScanner scanJarsrn信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.rn十二月 25, 2017 1:11:54 下午 org.apache.catalina.core.ApplicationContext logrn信息: No Spring WebApplicationInitializer types detected on classpathrn十二月 25, 2017 1:11:54 下午 org.apache.catalina.core.ApplicationContext logrn信息: Initializing Spring root WebApplicationContextrnlog4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).rnlog4j:WARN Please initialize the log4j system properly.rnlog4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.rn十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.StandardContext filterStartrn严重: Exception starting filter shiroFilterrnorg.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'shiroFilter' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:660)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1157)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:280)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198)rn at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:962)rn at org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:324)rn at org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:235)rn at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:199)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4699)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5339)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1126)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1868)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)rn at java.util.concurrent.FutureTask.run(FutureTask.java:262)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)rn at java.lang.Thread.run(Thread.java:745)rn十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.StandardContext startInternalrn严重: One or more Filters failed to start. Full details will be found in the appropriate container log filern十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.StandardContext startInternalrn严重: Context [/dsyn_yjy] startup failed due to previous errorsrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.ApplicationContext logrn信息: Closing Spring root WebApplicationContextrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreadsrn警告: The web application [dsyn_yjy] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:rn java.lang.Object.wait(Native Method)rn java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:135)rn com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:40)rn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\dsyn_yjy has finished in 4,314 msrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\examplesrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.ApplicationContext logrn信息: ContextListener: contextInitialized()rn十二月 25, 2017 1:11:55 下午 org.apache.catalina.core.ApplicationContext logrn信息: SessionListener: contextInitialized()rn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\examples has finished in 588 msrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\host-managerrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\host-manager has finished in 39 msrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\managerrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\manager has finished in 37 msrn十二月 25, 2017 1:11:55 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deploying web application directory E:\Tomcat 8.0\webapps\ROOTrn十二月 25, 2017 1:11:56 下午 org.apache.catalina.startup.HostConfig deployDirectoryrn信息: Deployment of web application directory E:\Tomcat 8.0\webapps\ROOT has finished in 64 msrn十二月 25, 2017 1:11:56 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["http-nio-8989"]rn十二月 25, 2017 1:11:56 下午 org.apache.coyote.AbstractProtocol startrn信息: Starting ProtocolHandler ["ajp-nio-8009"]rn十二月 25, 2017 1:11:56 下午 org.apache.catalina.startup.Catalina startrn信息: Server startup in 23445 msrnrnrnweb.xml和applicationContext.xml中的shiroFilter都配置了 id没有问题。。rn
ssm and shiro
ssm and shiro ,IDEA编辑器
shiro与ssm
基于Maven和SSM使用Shiro框架
SSM(三)Shiro使用详解
前言相比有做过企业级开发的童鞋应该都有做过权限安全之类的功能吧,最先开始我采用的是建用户表,角色表,权限表,之后在拦截器中对每一个请求进行拦截,再到数据库中进行查询看当前用户是否有该权限,这样的设计能满足大多数中小型系统的需求。不过这篇所介绍的Shiro能满足之前的所有需求,并且使用简单,安全性高,而且现在越来越的多企业都在使用Shiro,这应该是一个收入的你的技能库。创建自定义MyRealm类有关
ssm框架在web.xml中配置shiro拦截器tomcat启动报错
rn rn shiroFilterrn org.springframework.web.filter.DelegatingFilterProxyrn rn rn targetFilterLifecyclern truern rn rn rn shiroFilterrn *.dorn rnrn错误信息如下:rn org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [shiro] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
maven SSM项目启动报错
使用idea 2018 搭建maven ssm项目rn启动Tomcat后报错,如下:rn[code=java]ERROR [RMI TCP Connection(3)-127.0.0.1] - Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in file [D:\java\WorkSpace\wms-maven\target\ssm\WEB-INF\classes\spring\applicationContext-dao.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExceptionrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:471)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:700)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)rn at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1551)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:622)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:569)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)rn at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)rn at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)rn at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)rn at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)rn at sun.rmi.transport.Transport$1.run(Transport.java:200)rn at sun.rmi.transport.Transport$1.run(Transport.java:197)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.Transport.serviceCall(Transport.java:196)rn at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)rn七月 24, 2018 7:24:52 下午 org.apache.catalina.core.StandardContext startInternalrn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn严重: Error listenerStartrn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn七月 24, 2018 7:24:52 下午 org.apache.catalina.core.StandardContext startInternalrn at java.lang.Thread.run(Thread.java:748)rn严重: Context [/wms] startup failed due to previous errorsrnCaused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExceptionrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92)rn at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:101)rn at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)rn at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:289)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:958)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:930)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:465)rn ... 55 morernCaused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldExceptionrn at java.lang.Class.getDeclaredConstructors0(Native Method)rn at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)rn at java.lang.Class.getDeclaredConstructors(Class.java:2020)rn at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:234)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1040)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1013)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:269)rn at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:126)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1456)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn ... 67 morernCaused by: java.lang.ClassNotFoundException: org.aspectj.weaver.reflect.ReflectionWorld$ReflectionWorldExceptionrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)rn ... 80 morern[2018-07-24 07:24:52,075] Artifact wms-maven:war exploded: Error during artifact deployment[/code]rn
SSM项目Tomcat启动报错
[code=text] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'LoginDao': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'LoginMapper' is definedrn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5017)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5531)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1574)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1564)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:748)rnCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'LoginMapper' is definedrn at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:641)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1159)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:282)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:446)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:420)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:545)rn at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:155)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)rn ... 22 more[/code]rn这是dao实现类rn[code=java]rn@Repository("LoginDao")rnpublic class LoginDaoImpl implements LoginDao rn rn @Resource(name = "LoginMapper")rn private LoginMapper LoginMapper;rnrn public LoginMapper getLoginMapper() rn return LoginMapper;rn rnrn public void setLoginMapper(LoginMapper loginMapper) rn LoginMapper = loginMapper;rn [/code]rn这是service实现类rn[code=java]@Service("LoginService")rnpublic class LoginServiceImpl implements LoginService rn rn @Resourcern private LoginDao LoginDao;rn[/code]rn配置文件rn[code=text]rnrn rn rn rn rn rn classpath:database.propertiesrn rn rn rn rn rn rn rn rn rn rn $mysql.driver_classrn rn rn rn $mysql.connection.urlrn rn rn rn $mysql.connection.usernamern rn rn rn $mysql.connection.passwordrn rn rn rn 30rn rn rn rn 2rn rn rn rn 2rn rn rn rn 10rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn classpath:entity/config/*.xmlrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn rnrn[/code]rnspringmvc配置文件rn[code=text]rnrn rn rn rn rn rn rn rn rn text/html;charset=UTF-8 rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rnrn rn rn rn rn rnrn[/code]
ssm启动报错XXXbean未定义
在运行项目时,报错信息是一个实体类的bean未定义,原因是实体类没有注入到Spring,觉得很奇怪正常来讲框架配置是没问题的。找了一段时间后,发现是service层service和Transactional注解写的有问题,要注意配置是这样的...
ssm项目tomcat启动报错
今天在做完项目一个模块进行打包测试,启动tomca的时候出现如下错误:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'suHandlerServiceImpl': Injection of resource dependencies failed; nested exce...
ssm maven启动报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in file [E:\awtf\school\prj-manager\prj-manager-service\target\classes\spring\spring-dao.xml...
ssm框架整合启动报错记录
1.java.lang.IllegalArgumentException: Could not resolve resource location pattern 提示原因:class path resource [sy/mapping/] cannot be resolved to URL because it does not exist  查找原因:sqlMapper文件的类路径写错,c...
ssm整合,Tomcat启动报错
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MerchantService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ws.merchant.dao.MerchantDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1185)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:703)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ws.merchant.dao.MerchantDao] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1103)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:963)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:858)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:442)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:420)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:545)rn at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:155)rn at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)rn at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:305)rn ... 26 morernrnrnrn百度了很多解决方案,都是说 @ Service忘记写了,或者没加 rn rn rn但是我都加了,表示很无奈rn下面是我的一些代码rnrnrn[code=java]package com.ws.merchant.service.impl;rnrnimport javax.annotation.Resource;rnrnimport org.springframework.stereotype.Service;rnrnimport com.ws.merchant.dao.MerchantDao;rnimport com.ws.merchant.model.Merchant;rnimport com.ws.merchant.service.MerchantService;rnrn/**rn * 商户service实现类rn *rn * @author ldsrn * @date 2018-1-12rn *rn */rn@Service("MerchantService")rnpublic class MerchantServiceImpl implements MerchantServicern rn @Resourcern private MerchantDao merchantDao;rnrn @Overridern public Merchant getMerchById(String id) rn // TODO Auto-generated method stubrn return merchantDao.selectMerchant(id);rn rnrn @Overridern public int addMerchant(Merchant merch) rn // TODO Auto-generated method stubrn return merchantDao.insertMerchant(merch);rn rnrn @Overridern public int deleMerchant(String id) rn // TODO Auto-generated method stubrn return merchantDao.deleMerchant(id);rn rnrn[/code]rnrnrnrnrn[code=java] rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn [/code]rnrn各位大佬,救救我这个小白吧,快疯了,多谢多谢
ssm项目启动报错 java.lang.AbstractMethodError
22-Jan-2018 00:04:36.990 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpathrn22-Jan-2018 00:04:37.515 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContextrn22-Jan-2018 00:04:46.048 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [cors]rn[b] java.lang.AbstractMethodError[/b]rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4590)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5233)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)rn at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1739)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)rn at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)rn at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)rn at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)rn at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)rn at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)rn at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)rn at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)rn at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:498)rn at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)rn at sun.rmi.transport.Transport$1.run(Transport.java:200)rn at sun.rmi.transport.Transport$1.run(Transport.java:197)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.Transport.serviceCall(Transport.java:196)rn at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)rn at java.security.AccessController.doPrivileged(Native Method)rn at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)rn at java.lang.Thread.run(Thread.java:748)rnrn22-Jan-2018 00:04:46.077 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContextrnrn没有显示出错的地方,请问该如何解决rn
ssm整合shiro
springMvc+spring+mybatis+shiro的整合,有数据库文件
Shiro 和SSM的整合配置
将Shiro和Spring SpringMVC Mybatis 整合 配置文件: pom.xml(相关依赖) &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt; &amp;lt;version&amp;gt;4.12&amp;lt;/vers...
SSM整合Shiro框架
什么Shiro Shiro是做安全验证,权限管理,等… 是一种安全框架,属于轻量级框架。。 导入依赖(导入jar包) 如果用的是maven来管理项目的话,我们需要在pom.xml文件中加入依赖, 如果用的是动态的web工程,我们需要在lib文件夹中导入jar包,然后Build Path --&amp;gt; Add to Build Path Spring相关依赖 ; &amp;lt;dependency...
SSM整合Shiro(权限控制)
概述: 1、权限控制的两种方式:粗粒度基于URL级别权限控制、细粒度基于方法级别权限控制 2、基于Apache Shiro实现登录认证和权限控制,重点shiro权限控制流程、自定义Realm对象控制系统认证和授权 3、Apache Shiro实现细粒度方法级别权限控制 4、动态系统菜单显示功能 5、对认证和授权数据进行缓存优化; 权限控制方式_粗粒度URL级别权限控制 可以...
ssm的shiro实际应用
开始之前一定要先看一下大神的: Shiro学习--与SpringMVC整合(数据库,Shiro注解和Shiro标签 http://blog.csdn.net/frankcheng5143/article/details/50836619     1.使用maven,配置pom: &amp;lt;!-- https://mvnrepository.com/artifact/org.apache...
SSM整合shiro完整版
导包maven的pom文件<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/m
ssm项目整合shiro
之前有一篇文章是简单的介绍shiro的,但是现在需要整合到ssm的项目中,下面是步骤: 1、数据库中创建五张表,分别是用户表t_user、角色表t_role、权限表t_permission、用户和角色的关系表t_user_role、角色和权限表t_role_permission.DROP TABLE IF EXISTS `t_permission`; CREATE TABLE `t_permiss
shiro整合到ssm
第一次学习shiro,记录下,欢迎指出存在的问题。至于里面的sql查询,只是单纯起到效果,有空再去优化数据结构与查询语句。 1.首先导入jar包 &amp;lt;!-- Spring 整合Shiro需要的依赖 --&amp;gt; &amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.apache.shiro&amp;lt;/groupId&amp;gt; &amp;lt;ar...
shiro 权限 ssm
关于权限登录的例子,在公司做登录权限时,我先做一个例子试试,用MySQL,maven,springMVC,spring
Shiro整合到ssm
这个Shiro认证也是基于自定义认证来走的,所以需要熟悉Shiro的自定义认证. 现在直接上步骤 ,整合spring-shiro的过程 1.引入所有需要的依赖 &amp;lt;properties&amp;gt; &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt; &amp;l...
shiro与SSM项目整合
shiro于SSM整合所有的jar包 web.xml中配置shiro的filter 在web系统中,shiro也通过filter进行拦截。filter拦截后将操作权交给spring中配置的filterChain(过虑链儿) shiro提供很多filter。 applicationContext-shiro.xml ...
ssm整合shiro框架
<span style="color:#333333;">Apache Shiro是一个强大且易用的Java安全框架,提供了认证、授权、加密和会话管理等功能。Shiro都可以轻松为其提供全面的安全管理服务,相比业内spring security 而言,Shiro显得更加小巧,应用也更加广泛。本课程主要使用到java,shiro,spring,springmvc,mybatis,mysql,springboot技术,学习本课程需要具有一定的基础。</span><br />
学习 权限框架shiro 的ssm
学习 权限框架shiro 的ssm
SSM整合shiro入门
ssm整合shiro入门,集成了验证码、并发登陆人数、密码加密等,可拓展性极强
shiro + SSM 框架
shiro-rbac-demo-master 采用Shiro + SSM框架,可以正常运行,很简单也很实用,可以拓展很多示例
SSM和Shiro小项目
SSM+shiro,简单集成项目,实现shiro安全验证,内部附有文档说明,项目为maven项目,通俗易懂,希望对大家有帮助
SSM整合shiro和Activiti
SSM框架整合shiro权限控制和Activiti工作流,让你了解真实项目中如何使用权限控制和流程控制
ssm shiro 整合
ssm shiro ssm shiro ssm shirossm shirossm shirossm shiro
shiro与ssm环境的搭建
 最近在写社团后台管理系统,需要用到授权和认证。于是就学习了一下shiro,这一篇文章用来记录一下自己初次使用shiro来整合ssm,也方便初学者进行学习。此文章前提是已经配好ssm框架,还没有整合ssm的小伙伴,请先完成ssm的配置。 一、添加shiro依赖 在pom.xml文件中添加shiro的依赖 &amp;lt;!-- 添加shiro支持 --&amp;gt; &amp;lt;!--shiro核心...
SSM集成shiro权限管理
这几天在学习了shiro权限管理框架,在刚开始的时候学的时候因为这个配置问题困扰了我很长时间,所以在这篇文章我整合了自己用SSM搭建shiro权限框架的过程。   1.配置   1.1jar包 在项目配置开始前需要先导入shiro的相关jar包,下载地址:https://mvnrepository.com/: 如果你的项目时maven项目的话只需要在pom.xml中添加以下几个依赖:...
ssm整合shiro项目
自己没事整合了一个ssm与shiro,实现一些权限管理和角色管理
shiro与ssm的整合
1、首先在WEB-INF/web,xml中配置过滤器 DelegatingFilterProxy 作用是自动到 Spring 容器查找名字为 shiroFilter(filter-name) 的 bean 并把所有 Filter 的操作委托给它。 targetFilterLifecycle:指明作用于filter的所有生命周期。 如果设置&quot;targetFilterLifecycle&quot;为Tru...
ssm项目集成shiro
首先,这是创建ssm项目的地址:http://blog.csdn.net/qq_40706089/article/details/78707234,今天打算将shiro安全框架也给集成进来,网上对shiro的介绍非常之多,在这也不多赘述了,直接开始集成。 step1:通过pom文件管理shiro框架所需的jar包 整合shiro需要的依赖--> org.apache.shiro
ssm + shiro + ueditor
一个小demo 整合了ssm + shiro + ueditor,配置了事物相关但使用过程中需要注意方法命名,shiro只是配置没有从数据库获取用户信息,ueditor整合上去可以在页面上调用
相关热词 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法 c# gmail 发邮件 c# 多层文件