关于Spring运用过程中jar包报错问题

摘要:
使用Spring进行web开发时,第一步就是导入jar包,今天使用SPringTask开发定时器时,导入了好多次jar包,都是报错,不知道是因为jar包版本不同还是因为需要依赖的jar包没加入,反正就是怎么着都不行。后来终于找着全的了。首先记录一下springjar包报错的常见bug:org.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname'org.springframework.context.annotation.internalAsyncAnnotationProcessor':Initializationofbeanfailed;nestedexceptionisjava.lang.NoClassDefFoundError:org/aopalliance/aop/Advice目测这个bug感觉像springaop的jar包没导入,但实际上是已经导过的。最后才知道是因为aopalliance的jar包没导入才抛出这个错误的,这个包应该是aop依赖的吧。现在没时间仔细研究,先记录下来,下次整明白。

使用Spring进行web开发时,第一步就是导入jar包,今天使用SPring Task开发定时器时,导入了好多次jar包,都是报错,不知道是因为jar包版本不同还是因为需要依赖的jar包没加入,反正就是怎么着都不行。

后来终于找着全的了。

首先记录一下spring jar包报错的常见bug:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.context.annotation.internalAsyncAnnotationProcessor': Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice

目测这个bug感觉像spring aop的jar包没导入,但实际上是已经导过的。最后才知道是因为aopalliance的jar包没导入才抛出这个错误的,这个包应该是aop依赖的吧。

现在没时间仔细研究,先记录下来,下次整明白。

附,定时器开发需要的jar包目录:

关于Spring运用过程中jar包报错问题第1张

免责声明:文章转载自《关于Spring运用过程中jar包报错问题》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇docker在Ubuntu下1小时快速学习Android JNI 学习(五):References Api下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

使用SpringBoot Admin监控SpringCloud微服务

spring-boot admin的github地址:https://github.com/codecentric/spring-boot-admin 本文基于SpringCloud的环境和配置上增加配置信息,而不是从0开始的配置。 一、搭建admin服务端 1、引入pom <properties> <spring-boot-a...

【Spring Boot】Spring Boot之两种引入spring boot maven依赖的方式

一、方式一:spring-boot-starter-parent   <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifa...

Spring Boot在aop中获取request对象

doBefore(){ ServetRequestAttrbtes attributes =(ServetRequestAttrbtes)RequestContextHolder.getHttpattributes(); HttpServletRequest request =attributes.getRequest(); }...

Spring boot 使用profile完成不同环境的maven打包功能

<profiles> <profile> <id>dev</id> <properties> <!-- 环境标识,需要与配置文件的名称相对应 --> <activatedProperties>dev</activatedPropert...

spring boot swagger-ui.html 404

很奇怪的问题,找了好久。 因为spring boot+swagger实现起来很简单。看下面三部曲: 1.pom添加两个swagger依赖.    <!-- Swagger依赖包 --> <dependency> <groupId>io.springfox</groupId> <artifactId>...

spring mvc Response header content type

Xml代码 <bean >      <property name="messageConverters">    <list>     <ref bean="mappingJacksonHttpMessageConverter" /><!-- json转换器 -->    </list&g...