From 12dcd4e4bb806aedbd4e2022806450096e9a6ff6 Mon Sep 17 00:00:00 2001 From: Loredana Date: Sat, 17 Oct 2020 16:16:00 +0300 Subject: [PATCH 1/2] exclude logback, add log4j config file --- spring-boot-modules/spring-boot-mvc-birt/pom.xml | 16 +++++----------- .../src/main/resources/log4j.properties | 9 +++++++++ 2 files changed, 14 insertions(+), 11 deletions(-) create mode 100644 spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties diff --git a/spring-boot-modules/spring-boot-mvc-birt/pom.xml b/spring-boot-modules/spring-boot-mvc-birt/pom.xml index 0ab744bb26..1e3075dc2d 100644 --- a/spring-boot-modules/spring-boot-mvc-birt/pom.xml +++ b/spring-boot-modules/spring-boot-mvc-birt/pom.xml @@ -5,10 +5,10 @@ 4.0.0 - com.baeldung.spring-boot-modules - spring-boot-modules - 1.0.0-SNAPSHOT - ../ + org.springframework.boot + spring-boot-starter-parent + 2.1.1.RELEASE + spring-boot-mvc-birt @@ -19,10 +19,6 @@ Module For Spring Boot Integration with BIRT - - org.springframework.boot - spring-boot-starter - org.springframework.boot @@ -51,17 +47,14 @@ org.eclipse.birt.runtime_4.8.0-20180626 ${eclipse.birt.runtime.version} - log4j log4j ${log4j.version} - org.projectlombok lombok - ${lombok.version} provided @@ -81,6 +74,7 @@ 1.8 1.8 4.8.0 + 1.2.17 diff --git a/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties b/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties new file mode 100644 index 0000000000..e4fcb01308 --- /dev/null +++ b/spring-boot-modules/spring-boot-mvc-birt/src/main/resources/log4j.properties @@ -0,0 +1,9 @@ +# Set root logger level to DEBUG and its only appender to A1. +log4j.rootLogger=DEBUG, A1 + +# A1 is set to be a ConsoleAppender. +log4j.appender.A1=org.apache.log4j.ConsoleAppender + +# A1 uses PatternLayout. +log4j.appender.A1.layout=org.apache.log4j.PatternLayout +log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n \ No newline at end of file From 07da242830fd1e6864e7569d61fa94e271317ff8 Mon Sep 17 00:00:00 2001 From: Loredana Date: Sat, 17 Oct 2020 16:19:01 +0300 Subject: [PATCH 2/2] add context test, explanation --- spring-boot-modules/spring-boot-mvc-birt/pom.xml | 1 + .../com/baeldung/birt/engine/SpringContextTest.java | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java diff --git a/spring-boot-modules/spring-boot-mvc-birt/pom.xml b/spring-boot-modules/spring-boot-mvc-birt/pom.xml index 1e3075dc2d..4963cc3036 100644 --- a/spring-boot-modules/spring-boot-mvc-birt/pom.xml +++ b/spring-boot-modules/spring-boot-mvc-birt/pom.xml @@ -4,6 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 + org.springframework.boot spring-boot-starter-parent diff --git a/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java b/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java new file mode 100644 index 0000000000..5235a494df --- /dev/null +++ b/spring-boot-modules/spring-boot-mvc-birt/src/test/java/com/baeldung/birt/engine/SpringContextTest.java @@ -0,0 +1,13 @@ +package com.baeldung.birt.engine; + +import org.junit.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +public class SpringContextTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + + } +}