0
我使用AnnotationConfigApplicationContext運行我SpringBoot應用程序登錄:禁用春天在使用AnnotationConfigApplicationContext
ApplicationContext context = new AnnotationConfigApplicationContext(SpringCoreConfig.class);
和SpringCoreConfig類是隻:
@Configuration
@EnableAutoConfiguration
@ComponentScan(basePackages = "com.ocado.cfc.optimisation")
@PropertySource("classpath:application.properties")
public class SpringCoreConfig {}
但我的應用程序的輸出是不可讀由於日誌記錄級別DEBUG 。 我試圖設置在application.properties日誌記錄級別爲INFO:
logging.level.root=OFF
但它不會改變任何東西。
如何更改日誌記錄級別以擺脫該問題?