Spring引入并启用log4j日志框架-----Spring框架



    4.0.0

    com.powernode
    Spring6-002-first
    1.0-SNAPSHOT
    
    jar

    
        
        
            repository.spring.milestone
            Spring Milestone Repository
            https://repo.spring.io/milestone
        
    
    
        
        
        
        
            org.springframework
            spring-context
            6.1.0-M2
        
        
        
            org.apache.logging.log4j
            log4j-core
            2.19.0
        
        
            org.apache.logging.log4j
            log4j-slf4j2-impl
            2.19.0
        
        
        
            junit
            junit
            4.13.2
            test
        
    
    
        17
        17
        UTF-8
    


xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0

com.powernode
Spring6-002-first
1.0-SNAPSHOT

jar




repository.spring.milestone
Spring Milestone Repository
https://repo.spring.io/milestone







org.springframework
spring-context
6.1.0-M2



org.apache.logging.log4j
log4j-core
2.19.0


org.apache.logging.log4j
log4j-slf4j2-impl
2.19.0



junit
junit
4.13.2
test



17
17
UTF-8





    
        
        
        
            
        
    
    
        
        
            
            
        
    


















    @Test
    public void TestBeginInitBean()
    {
        //不是在getBean方法调用时才创建对象,执行解析xml文件时就已经创建对象了
        new ClassPathXmlApplicationContext("spring6.xml");
        Logger logger = LoggerFactory.getLogger(firstSpringTest.class);
        logger.info("我是一条消息");
        logger.debug("我是一条调试消息");
        logger.error("我是一条错误消息");
    }

@Test
public void TestBeginInitBean()
{
//不是在getBean方法调用时才创建对象,执行解析xml文件时就已经创建对象了
new ClassPathXmlApplicationContext("spring6.xml");
Logger logger = LoggerFactory.getLogger(firstSpringTest.class);
logger.info("我是一条消息");
logger.debug("我是一条调试消息");
logger.error("我是一条错误消息");
}

你可能感兴趣的:(Spring框架,JAVA随手写,spring,java,后端,开发语言,eclipse,intellij-idea,数据结构)