问答详情
源自:3-2 引入相应配置文件-SSH环境搭建

求资料下载地址

老师,您的applicationContext.xml文件和log4j.properties文件能共享一下吗?

提问者:深大小吴 2016-08-23 11:12

个回答

  • qq_你就是梦想_0
    2016-08-23 21:28:21
    已采纳

    这是applicationContext.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" xmlns:context="http://www.springframework.org/schema/context"

    xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee"

    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jpa="http://www.springframework.org/schema/data/jpa"

    xsi:schemaLocation="

    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd

    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd

    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd

    http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd

    http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd

    http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd">

    </beans>

    这是log4j文件

    #--------console-----------

    log4j.rootLogger=error,myconsole

    log4j.appender.myconsole=org.apache.log4j.ConsoleAppender

    log4j.appender.myconsole.layout=org.apache.log4j.SimpleLayout

    #--------HTML-----------

    #log4j.rootLogger=error,myfile

    #log4j.appender.myfile=org.apache.log4j.FileAppender

    #log4j.appender.myfile.File=D\:\\error.html

    #log4j.appender.myfile.layout=org.apache.log4j.HTMLLayout

    #--------txt,log-----------

    #log4j.rootLogger=error,myfile

    #log4j.appender.myfile=org.apache.log4j.FileAppender

    #log4j.appender.myfile.File=D\:\\error.log

    #log4j.appender.myfile.layout=org.apache.log4j.PatternLayout


  • qq_快乐
    2017-08-09 15:57:05

    谢谢了



  • 天空依然美丽
    2017-08-02 14:39:40

    好人一生平安!

  • 慕瓜4132719
    2016-09-23 21:10:19

    log4j 那个怎么创建文件

  • scvarus
    2016-09-13 20:28:26

    好人一生平安