zoukankan      html  css  js  c++  java
  • spring异常

    1.The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files

    spring的core包异常,在页面上也没有明确的错误地址,此种情况原因为mvn库的springframework使用springboot构造工程导入过依赖jar包,和普通的jar包依赖不一样导致报错。方法就是删除mvn库中的springboot的依赖jar包,重新update 工程(mvn package -U)。

    ※注意springBoot不能和springmvc的一般配置建立的工程共用一个mvn库。 

    2.严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener

    ContextLoaderListener 没有找到异常

    ContextLoaderListener类 实现ServletContextListener接口,在启动Web容器时,自动装配ApplicationContext.xml的配置信息。默认配置信息在

    WEB-INF/ApplicationContext.xml中。当然也可以自定义位置。

    3. cvc-complex-type.2.4.a:Invalid content was found starting with element 'bean'

     是因为conponent-scan 不能放在bean中。

     4. spring启动缺少slf4j

    可参考以下的log配置。

        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-log4j12</artifactId>
          <version>1.7.6</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <version>1.7.6</version>
          <scope>compile</scope>
        </dependency>
        <dependency>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
          <version>1.2.17</version>
          <scope>test</scope>
        </dependency>   
  • 相关阅读:
    python数据采集与多线程效率分析
    Memcache使用基础
    《大规模 web服务开发》笔记
    画了一张PHPCMSV9的运行流程思维导图
    MySQL的正则表达式
    linux patch 格式与说明(收录)
    Memcached笔记之分布式算法
    bzoj 2120 带修改莫队
    bzoj 2073 暴力
    bzoj 1814 Ural 1519 Formula 1 插头DP
  • 原文地址:https://www.cnblogs.com/DennyZhao/p/7871634.html
Copyright © 2011-2022 走看看