JAVA-8361: Split or move spring-5 module
This commit is contained in:
@@ -10,5 +10,4 @@ This module contains articles about Spring 5
|
||||
- [Spring ResponseStatusException](https://www.baeldung.com/spring-response-status-exception)
|
||||
- [Spring Assert Statements](https://www.baeldung.com/spring-assert)
|
||||
- [Difference between \<context:annotation-config> vs \<context:component-scan>](https://www.baeldung.com/spring-contextannotation-contextcomponentscan)
|
||||
- [Finding the Spring Version](https://www.baeldung.com/spring-find-version)
|
||||
- [Configuring a Hikari Connection Pool with Spring Boot](https://www.baeldung.com/spring-boot-hikari)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.baeldung.version;
|
||||
|
||||
import org.springframework.boot.system.JavaVersion;
|
||||
import org.springframework.boot.system.SystemProperties;
|
||||
import org.springframework.core.SpringVersion;
|
||||
|
||||
public class VersionObtainer {
|
||||
|
||||
public String getSpringVersion() {
|
||||
return SpringVersion.getVersion();
|
||||
}
|
||||
|
||||
public String getJavaVersion() {
|
||||
return JavaVersion.getJavaVersion().toString();
|
||||
}
|
||||
|
||||
public String getJdkVersion() {
|
||||
return SystemProperties.get("java.version");
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.baeldung.version;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
@SpringBootTest(classes = VersionObtainer.class)
|
||||
public class VersionObtainerUnitTest {
|
||||
|
||||
public VersionObtainer version = new VersionObtainer();
|
||||
|
||||
@Test
|
||||
public void testGetSpringVersion() {
|
||||
String res = version.getSpringVersion();
|
||||
assertThat(res).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetJdkVersion() {
|
||||
String res = version.getJdkVersion();
|
||||
assertThat(res).isNotEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetJavaVersion() {
|
||||
String res = version.getJavaVersion();
|
||||
assertThat(res).isNotEmpty();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user