Merge branch 'master' of https://github.com/eugenp/tutorials into BAEL-9550
This commit is contained in:
commit
72cec87e82
|
@ -29,7 +29,6 @@
|
|||
- [AWS Lambda With Java](http://www.baeldung.com/java-aws-lambda)
|
||||
- [Introduction to Nashorn](http://www.baeldung.com/java-nashorn)
|
||||
- [Chained Exceptions in Java](http://www.baeldung.com/java-chained-exceptions)
|
||||
- [A Quick JUnit vs TestNG Comparison](http://www.baeldung.com/junit-vs-testng)
|
||||
- [Java Primitive Conversions](http://www.baeldung.com/java-primitive-conversions)
|
||||
- [Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency)
|
||||
- [JVM Log Forging](http://www.baeldung.com/jvm-log-forging)
|
||||
|
@ -150,9 +149,11 @@
|
|||
- [Throw Exception in Optional in Java 8](https://www.baeldung.com/java-optional-throw-exception)
|
||||
- [Add a Character to a String at a Given Position](https://www.baeldung.com/java-add-character-to-string)
|
||||
- [Synthetic Constructs in Java](https://www.baeldung.com/java-synthetic)
|
||||
- [Calculating the nth Root in Java](https://www.baeldung.com/java-nth-root)
|
||||
- [Convert Double to String, Removing Decimal Places](https://www.baeldung.com/java-double-to-string)
|
||||
- [Different Ways to Capture Java Heap Dumps](https://www.baeldung.com/java-heap-dump-capture)
|
||||
- [How to Separate Double into Integer and Decimal Parts](https://www.baeldung.com/java-separate-double-into-integer-decimal-parts)
|
||||
- [ZoneOffset in Java](https://www.baeldung.com/java-zone-offset)
|
||||
- [Hashing a Password in Java](https://www.baeldung.com/java-password-hashing)
|
||||
- [Java Switch Statement](https://www.baeldung.com/java-switch)
|
||||
- [The Modulo Operator in Java](https://www.baeldung.com/modulo-java)
|
||||
|
|
3
pom.xml
3
pom.xml
|
@ -484,6 +484,7 @@
|
|||
<module>spring-boot-mvc</module>
|
||||
<module>spring-boot-vue</module>
|
||||
<module>spring-boot-logging-log4j2</module>
|
||||
<module>spring-boot-disable-console-logging</module>
|
||||
<module>spring-cloud-data-flow</module>
|
||||
<module>spring-cloud</module>
|
||||
<module>spring-cloud-bus</module>
|
||||
|
@ -1026,6 +1027,7 @@
|
|||
<module>spring-boot-security</module>
|
||||
<module>spring-boot-mvc</module>
|
||||
<module>spring-boot-logging-log4j2</module>
|
||||
<module>spring-boot-disable-console-logging</module>
|
||||
<module>spring-cloud-data-flow</module>
|
||||
<module>spring-cloud</module>
|
||||
<module>spring-cloud-bus</module>
|
||||
|
@ -1384,6 +1386,7 @@
|
|||
<module>spring-boot-security</module>
|
||||
<module>spring-boot-mvc</module>
|
||||
<module>spring-boot-logging-log4j2</module>
|
||||
<module>spring-boot-disable-console-logging</module>
|
||||
<module>spring-cloud-data-flow</module>
|
||||
<module>spring-cloud</module>
|
||||
<module>spring-cloud-bus</module>
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
### Relevant Articles:
|
||||
- [How to Disable Console Logging in Spring Boot](https://www.baeldung.com/spring-boot-disable-console-logging)
|
|
@ -3,10 +3,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>disabling-console-jul</artifactId>
|
||||
|
||||
<!-- this needs to use the boot parent directly in order to not inherit logback dependencies -->
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>disabling-console-logging</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
|
@ -3,10 +3,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>disabling-console-log4j2</artifactId>
|
||||
|
||||
<!-- this needs to use the boot parent directly in order to not inherit logback dependencies -->
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>disabling-console-logging</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
|
@ -2,8 +2,16 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>disabling-console-logging</artifactId>
|
||||
<artifactId>spring-boot-disable-console-logging</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>disabling-console-logback</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -1,14 +1,15 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>disabling-console-logging</artifactId>
|
||||
<artifactId>spring-boot-disable-console-logging</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<description>Projects for Disabling Spring Boot Console Logging tutorials</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>spring-boot-logging-log4j2</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
|
@ -1,3 +1,2 @@
|
|||
### Relevant Articles:
|
||||
- [Logging in Spring Boot](http://www.baeldung.com/spring-boot-logging)
|
||||
- [How to Disable Console Logging in Spring Boot](https://www.baeldung.com/spring-boot-disable-console-logging)
|
||||
|
|
|
@ -4,41 +4,58 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-boot-logging-log4j2</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<description>Projects for Spring Boot Logging tutorials</description>
|
||||
<packaging>jar</packaging>
|
||||
<description>Demo project for Spring Boot Logging with Log4J2</description>
|
||||
|
||||
<!-- this needs to use the boot parent directly in order to not inherit logback dependencies -->
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<version>2.0.5.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<modules>
|
||||
<module>spring-boot-logging-log4j2-app</module>
|
||||
<module>disabling-console-logging</module>
|
||||
</modules>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<forkCount>3</forkCount>
|
||||
<reuseForks>true</reuseForks>
|
||||
<excludes>
|
||||
<exclude>**/*IntegrationTest.java</exclude>
|
||||
<exclude>**/*IntTest.java</exclude>
|
||||
<exclude>**/*ManualTest.java</exclude>
|
||||
<exclude>**/*LiveTest.java</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<properties>
|
||||
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" 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">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-boot-logging-log4j2-app</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<description>Demo project for Spring Boot Logging with Log4J2</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>spring-boot-logging-log4j2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -32,6 +32,6 @@ public class LoggingController {
|
|||
loggerNative.warn("This WARN message been printed by Log4j2 without passing through SLF4J");
|
||||
loggerNative.error("This ERROR message been printed by Log4j2 without passing through SLF4J");
|
||||
loggerNative.fatal("This FATAL message been printed by Log4j2 without passing through SLF4J");
|
||||
return "Howdy! Check out the Logs to see the output printed directly throguh Log4j2...";
|
||||
return "Howdy! Check out the Logs to see the output printed directly through Log4j2...";
|
||||
}
|
||||
}
|
|
@ -15,3 +15,4 @@
|
|||
- [The Order of Tests in JUnit](http://www.baeldung.com/junit-5-test-order)
|
||||
- [Running JUnit Tests Programmatically, from a Java Application](https://www.baeldung.com/junit-tests-run-programmatically-from-java)
|
||||
- [Testing an Abstract Class With JUnit](https://www.baeldung.com/junit-test-abstract-class)
|
||||
- [A Quick JUnit vs TestNG Comparison](http://www.baeldung.com/junit-vs-testng)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.throwsexception;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
public class Calculator {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.throwsexception;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
public class DivideByZeroException extends RuntimeException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.throwsexception;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.suite.childpackage1;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.suite.childpackage2;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.customtestname;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.parameterisedsource;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.parameterisedsource;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
public enum PizzaDeliveryStrategy {
|
||||
EXPRESS,
|
|
@ -1,7 +1,5 @@
|
|||
package org.baeldung.java.suite;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import org.baeldung.java.suite.childpackage1.Class1UnitTest;
|
||||
import org.baeldung.java.suite.childpackage2.Class2UnitTest;
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.platform.suite.api.SelectClasses;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.suite;
|
||||
package com.baeldung.junit5vstestng;
|
||||
|
||||
import org.junit.platform.runner.JUnitPlatform;
|
||||
import org.junit.platform.suite.api.SelectPackages;
|
|
@ -11,7 +11,7 @@ import org.junit.jupiter.api.BeforeAll;
|
|||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class SummationServiceIntegrationTest {
|
||||
public class SummationServiceUnitTest {
|
||||
private static List<Integer> numbers;
|
||||
|
||||
@BeforeAll
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.mockito;
|
||||
|
||||
public class FinalList extends MyList {
|
||||
public final class FinalList extends MyList {
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
|
|
Loading…
Reference in New Issue