Spring框架需要的jar包


1、Spring压缩包中的四个核心JAR包

beans 、context、core 和expression

下载地址:

https://pan.baidu.com/s/1qXLHzAW

2、以及日志jar包

commons-logging 和log4j

下载地址:

https://pan.baidu.com/s/1mimTW5i

3、再增加一个

spring-aop-5.0.1.RELEASE.jar (用于注解,在Spring-framework库中包含)

4、再增加

spring-aspects-5.0.1.RELEASE.jar (在Spring-framework库中包含)

aspectjweaver-1.8.12.jar (官方下载地址 http://mvnrepository.com/artifact/org.aspectj/aspectjweaver)

aopalliance-1.0.jar            (官方下载地址 http://mvnrepository.com/artifact/aopalliance/aopalliance/1.0)


就位后,日志的jar包实际上以安装,却没有发挥作用,还需要把log4j的配置文件复制到src下,没有配置文件不知道用什么格式,如何输出

日志配置文件log4j.properties文件中内容如下:

#日志等级

#TRACE:详细等级,堆栈信息

#debug:类似于System.out.print

#info:类似于Hibernate的show_sql

#warn:不影响运行, 只是提示

#error:出现异常

#全局日志等级配置,输出位置

log4j.rootLogger=info,stdout,logfile

#stdout控制器

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.Target=System.out

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

#输出格式

log4j.appender.stdout.layout.ConversionPattern=%d %p [%c]:%L - %m%n

#文件路径输出

log4j.appender.logfile=org.apache.log4j.RollingFileAppender

#默认输出到tomcat的根路径或者运行测试工程的根路径

log4j.appender.logfile.File=pss.log

log4j.appender.logfile.MaxFileSize=512KB

# Keep three backup files.

log4j.appender.logfile.MaxBackupIndex=3

# Pattern to output: date priority [category] - message

log4j.appender.logfile.layout=org.apache.log4j.PatternLayout

log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] - %m%n

配置完成后,再次执行,得到结果不同了,没有Warning了

2017-11-23 11:08:04,354 INFO [org.springframework.context.support.ClassPathXmlApplicationContext]:589 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@19747cc: startup date [Thu Nov 23 11:08:04 CST 2017]; root of context hierarchy
2017-11-23 11:08:04,693 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]:316 - Loading XML bean definitions from class path resource [aop.xml]
This is AdviceBook's before()...............
This is AdviceBook's front()...............
This is Book's fun()..............
This is AdviceBook's end()...............
This is AdviceBook's after()...............

日志级别看更详细信息可以用debug,显示会更细致。

Spring框架 (log4j :WARN No appenders could be found for logger log4j:WARN Please initialize the log4j system properly.)问题解决的更多相关文章

  1. log4j:WARN No appenders could be found for logger

    直接写我的解决办法: 在src下面新建file名为log4j.properties内容如下:# Configure logging for testing: optionally with log f ...

  2. 解决log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader)警告信息的问题

    spring项目经常在启动tomcat时报如下警告信息: log4j:WARN No appenders could be found for logger (org.springframework. ...

  3. 关于控制台输出 警告 log4j:WARN No appenders could be found for logger

    新建struts2项目时出现警告 log4j:WARN No appenders could be found for logger 于是上网搜查了解决方案 转自:最爱NBA 在src下面新建file ...

  4. log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).

    一.异常描述: log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLo ...

  5. spring Log4j关于No appenders could be found for logger的警告

    (spring环境下)配置Log4j时候,当启动WEB程序时,提示了如标题的警告,具体如下:log4j:WARN No appenders could be found for logger (org ...

  6. (转)log4j:WARN No appenders could be found for logger 解决方案

    我们在使用Log4j的时候,总是出现: log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.Log ...

  7. log4j:WARN No appenders could be found for logger 解决方案

    我们在使用Log4j的时候,总是出现: log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.Log ...

  8. log4j:WARN No appenders could be found for logger 解决办法

    转自:https://blog.csdn.net/chw0629/article/details/80567936 使用log4j时不起作用,每次执行完出现以下提示: log4j:WARN No ap ...

  9. log4j:WARN Please initialize the log4j system properly 问题解决

    log4j:WARN No appenders could be found for logger (com.netease.qa.testng.TestngRetry).log4j:WARN Ple ...

  10. mybatis WARN No appenders could be found for logger的解决方法

    log4j:WARN No appenders could be found for logger (org.apache.ibatis.logging.LogFactory).log4j:WARN ...

随机推荐

  1. linux软硬连接学习总结

    创建连接实质上就是给系统中已经存在的文件指定另外一个可以访问它的名称,linux系统当中连接的创建有两种形式:硬链接(Hard Link),与符号链接(Symbloic Link)既软链接. ln命令 ...

  2. CentOS Linux自动备份MySQL数据库到远程FTP服务器并删除指定日期前的备份Shell脚本

    说明: 我这里要把MySQL数据库存放目录/var/lib/mysql下面的pw85数据库备份到/home/mysql_data里面,并且保存为mysqldata_bak_2011_11_03.tar ...

  3. PCB 线路铜皮面积(残铜率)计算的实现方法

    一个多月没更新博客园了,这里继续分享关于PCB工程相关一些知识,做过PCB工程都知道用使用genesis或incam是可以非常方便的计算得到铜皮面积这个参数[下图],但实际这个软件是通过什么算法计算出 ...

  4. E20170415-ms

    opaque adj 不透明的 n 不透明 adapter n 配适器

  5. Qt基本应用

    1 使用方式 在qt designer中直接设计图形界面,然后使用pyGUI转换成py文件. 可以发现,转换的文件为一个class.并不是一个完整的程序(运行时无法出现窗口).这个类名字是Ui_Mai ...

  6. Educational Codeforces Round 24 E

    Vova again tries to play some computer card game. The rules of deck creation in this game are simple ...

  7. windows下配置java环境jdk

    Windows系统下搭建java的开发环境和配置环境变量 具体步骤打开链接地址:https://www.cnblogs.com/lijuntao/p/6694483.html

  8. EOJ Monthly

    ###2018.10 A.oxx 的小姐姐们 oxx 和他的小姐姐(们)躺在图书馆前的大草坪上看星星. 有强迫症的 oxx 想要使得他的小姐姐们正好躺成一块 n×m 的长方形. 已知小姐姐的形状是 1 ...

  9. A*算法、导航网格、路径点寻路对比(A-Star VS NavMesh VS WayPoint)

    在Unity3d中,我们一般常用的寻路算法:   1.A*算法插件   与贪婪算法不一样,贪婪算法适合动态规划,寻找局部最优解,不保证最优解.A*是静态网格中求解最短路最有效的方法.也是耗时的算法,不 ...

  10. poj2385 Apple Catching

    思路: 简单dp. 实现: #include <iostream> #include <cstdio> #include <cstring> using names ...