[SPRING] Spring의 기본 출력을 멈추는 방법은 무엇입니까?
SPRINGSpring의 기본 출력을 멈추는 방법은 무엇입니까?
나는 봄에 새로운 사람이다. Spring 배치 애플리케이션을 실행할 때 "Hello World!"만 볼 것으로 예상되지만 대신 다음과 같은 추가 세부 정보가 표시됩니다.
May 03, 2012 12:28:42 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4e660b27: startup date [Thu May 03 12:28:42 EDT 2012]; root of context hierarchy May 03, 2012 12:28:42 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [helloWorldJob.xml] May 03, 2012 12:28:43 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from class path resource [MEMORY-JOBREPOSITORY.xml] May 03, 2012 12:28:44 PM org.springframework.beans.factory.support.DefaultListableBeanFactory registerBeanDefinition INFO: Overriding bean definition for bean 'helloWorldJob': replacing [Generic bean: class [org.springframework.batch.core.configuration.xml.SimpleFlowFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] with [Generic bean: class [org.springframework.batch.core.configuration.xml.JobParserJobFactoryBean]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] May 03, 2012 12:28:44 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@63dfb24d: defining beans [jobRepository,jobRepository-transactionManager,jobLauncher,hello,world,org.springframework.batch.core.scope.internalStepScope,org.springframework.beans.factory.config.CustomEditorConfigurer,org.springframework.batch.core.configuration.xml.CoreNamespacePostProcessor,step0,step1,helloWorldJob]; root of factory hierarchy May 03, 2012 12:28:44 PM org.springframework.aop.framework.DefaultAopProxyFactory INFO: CGLIB2 available: proxyTargetClass feature enabled May 03, 2012 12:28:44 PM org.springframework.batch.core.launch.support.SimpleJobLauncher afterPropertiesSet INFO: No TaskExecutor has been set, defaulting to synchronous executor. May 03, 2012 12:28:44 PM org.springframework.batch.core.launch.support.SimpleJobLauncher$1 run INFO: Job: [FlowJob: [name=helloWorldJob]] launched with the following parameters: [{time=11:06AM}] May 03, 2012 12:28:44 PM org.springframework.batch.core.job.SimpleStepHandler handleStep INFO: Executing step: [step0] HelloMay 03, 2012 12:28:44 PM org.springframework.batch.core.job.SimpleStepHandler handleStep INFO: Executing step: [step1] World!May 03, 2012 12:28:44 PM org.springframework.batch.core.launch.support.SimpleJobLauncher$1 run INFO: Job: [FlowJob: [name=helloWorldJob]] completed with the following parameters: [{time=11:06AM}] and the following status: [COMPLETED] May 03, 2012 12:28:44 PM org.springframework.context.support.AbstractApplicationContext doClose INFO: Closing org.springframework.context.support.ClassPathXmlApplicationContext@4e660b27: startup date [Thu May 03 12:28:42 EDT 2012]; root of context hierarchy May 03, 2012 12:28:44 PM org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletons INFO: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@63dfb24d: defining beans [jobRepository,jobRepository-transactionManager,jobLauncher,hello,world,org.springframework.batch.core.scope.internalStepScope,org.springframework.beans.factory.config.CustomEditorConfigurer,org.springframework.batch.core.configuration.xml.CoreNamespacePostProcessor,step0,step1,helloWorldJob]; root of factory hierarchy
이 여분의 것들이 보이지 않게하는 방법? 감사.
추가 정보 - log4j.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="appender" class="org.apache.log4j.FileAppender">
<param name="File" value="helloWorld-Log.txt"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%t] %p - %m%n"/>
</layout>
</appender>
<appender name="ConsoleAppender" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.SimpleLayout"/>
</appender>
<root>
<priority value ="ERROR"/>
<appender-ref ref="ConsoleAppender"/>
</root>
</log4j:configuration>
해결법
-
==============================
1.Log4J 로깅으로 전환하고 로그 레벨을 ERROR 또는 FATAL로 설정할 수 있습니다. 그런 식으로 모든 비 오류 로깅을 비활성화합니다.
Log4J 로깅으로 전환하고 로그 레벨을 ERROR 또는 FATAL로 설정할 수 있습니다. 그런 식으로 모든 비 오류 로깅을 비활성화합니다.
그러나 Dave Newton은 맞습니다. 그것은 나쁜 생각처럼 들립니다.
from https://stackoverflow.com/questions/10435557/how-to-stop-springs-default-output by cc-by-sa and MIT license
'SPRING' 카테고리의 다른 글
[SPRING] 전파 .REQUIRES_NEW로 인해 LockWaitTimeOutException이 발생 함 (0) | 2019.05.16 |
---|---|
[SPRING] SpringSource Tool Suite에 Spring MVC 프로젝트 템플릿이 없다. (0) | 2019.05.16 |
[SPRING] 스프링 휴식 자원 변경 경로 (0) | 2019.05.16 |
[SPRING] Spring 배치의 jobrepository와 writer에 대한 별도의 데이터 소스 (0) | 2019.05.16 |
[SPRING] @ResponseBody를 통해 반환 할 때 DTO JSON에서 날짜 형식 변경 (0) | 2019.05.16 |