Merge remote-tracking branch 'upstream/master' into JAVA-8794
This commit is contained in:
+19
-17
@@ -2,12 +2,21 @@ package com.baeldung.java9.modules;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.hamcrest.Matchers.hasItems;
|
||||
import static org.hamcrest.collection.IsEmptyCollection.empty;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.lang.module.ModuleDescriptor;
|
||||
import java.lang.module.ModuleDescriptor.*;
|
||||
|
||||
import java.lang.module.ModuleDescriptor.Builder;
|
||||
import java.lang.module.ModuleDescriptor.Exports;
|
||||
import java.lang.module.ModuleDescriptor.Opens;
|
||||
import java.lang.module.ModuleDescriptor.Provides;
|
||||
import java.lang.module.ModuleDescriptor.Requires;
|
||||
import java.sql.Date;
|
||||
import java.sql.Driver;
|
||||
import java.util.HashMap;
|
||||
@@ -16,7 +25,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
|
||||
|
||||
public class ModuleAPIUnitTest {
|
||||
|
||||
@@ -28,14 +37,9 @@ public class ModuleAPIUnitTest {
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
Class<HashMap> hashMapClass = HashMap.class;
|
||||
javaBaseModule = hashMapClass.getModule();
|
||||
|
||||
Class<Date> dateClass = Date.class;
|
||||
javaSqlModule = dateClass.getModule();
|
||||
|
||||
Class<Person> personClass = Person.class;
|
||||
module = personClass.getModule();
|
||||
javaBaseModule = HashMap.class.getModule();
|
||||
javaSqlModule = Date.class.getModule();
|
||||
module = Person.class.getModule();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -111,7 +115,6 @@ public class ModuleAPIUnitTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore // fixing in http://team.baeldung.com/browse/JAVA-8679
|
||||
public void givenModules_whenAccessingModuleDescriptorProvides_thenProvidesAreReturned() {
|
||||
Set<Provides> javaBaseProvides = javaBaseModule.getDescriptor().provides();
|
||||
Set<Provides> javaSqlProvides = javaSqlModule.getDescriptor().provides();
|
||||
@@ -120,7 +123,7 @@ public class ModuleAPIUnitTest {
|
||||
.map(Provides::service)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertThat(javaBaseProvidesService, contains("java.nio.file.spi.FileSystemProvider"));
|
||||
assertThat(javaBaseProvidesService, hasItem("java.nio.file.spi.FileSystemProvider"));
|
||||
assertThat(javaSqlProvides, empty());
|
||||
}
|
||||
|
||||
@@ -132,15 +135,14 @@ public class ModuleAPIUnitTest {
|
||||
.map(Exports::source)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
assertThat(javaSqlExportsSource, hasItems("java.sql", "javax.sql"));
|
||||
assertThat(javaSqlExportsSource, hasItems("java.sql", "javax.sql"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenModules_whenAccessingModuleDescriptorUses_thenUsesAreReturned() {
|
||||
Set<String> javaBaseUses = javaBaseModule.getDescriptor().uses();
|
||||
Set<String> javaSqlUses = javaSqlModule.getDescriptor().uses();
|
||||
|
||||
assertThat(javaSqlUses, contains("java.sql.Driver"));
|
||||
assertThat(javaSqlUses, hasItem("java.sql.Driver"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.baeldung.implicitsuperconstructorundefined;
|
||||
|
||||
public class Employee extends Person {
|
||||
|
||||
private Double salary;
|
||||
|
||||
public Employee(String name, Integer age, Double salary) {
|
||||
// comment this super call to see the error.
|
||||
super(name, age);
|
||||
this.salary = salary;
|
||||
}
|
||||
|
||||
public Employee(Double salary) {
|
||||
super();
|
||||
this.salary = salary;
|
||||
}
|
||||
|
||||
public Double getSalary() {
|
||||
return salary;
|
||||
}
|
||||
|
||||
public void setSalary(Double salary) {
|
||||
this.salary = salary;
|
||||
}
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.baeldung.implicitsuperconstructorundefined;
|
||||
|
||||
public class Person {
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer age;
|
||||
|
||||
public Person(String name, Integer age) {
|
||||
this.name = name;
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
// comment this constructor to see the error.
|
||||
public Person() {
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -5,4 +5,4 @@ This module contains articles about types in Java
|
||||
### Relevant Articles:
|
||||
|
||||
- [Convert an Array of Primitives to an Array of Objects](https://www.baeldung.com/java-primitive-array-to-object-array)
|
||||
- [Check if an Enum Value Exists in Java](https://www.baeldung.com/java-find-enum-by-criteria)
|
||||
- [Check if an Enum Value Exists in Java](https://www.baeldung.com/java-search-enum-values)
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.With;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public abstract class Device {
|
||||
private final String serial;
|
||||
@With
|
||||
private final boolean isInspected;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.With;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class Holder {
|
||||
@With
|
||||
private String variableA;
|
||||
@With
|
||||
private String _variableB;
|
||||
@With
|
||||
private String $variableC;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NonNull;
|
||||
import lombok.With;
|
||||
|
||||
@With
|
||||
@AllArgsConstructor
|
||||
public class ImprovedUser {
|
||||
@NonNull
|
||||
private final String username;
|
||||
@NonNull
|
||||
private final String emailAddress;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
public class KioskDevice extends Device {
|
||||
|
||||
public KioskDevice(String serial, boolean isInspected) {
|
||||
super(serial, isInspected);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Device withInspected(boolean isInspected) {
|
||||
return new KioskDevice(getSerial(), isInspected);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.With;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class Stock {
|
||||
@With
|
||||
private String sku;
|
||||
private int stockCount;
|
||||
|
||||
public Stock withSku(String sku) {
|
||||
return new Stock("mod-" + sku, stockCount);
|
||||
}
|
||||
|
||||
public Stock withSKU(String... sku) {
|
||||
return sku == null || sku.length == 0 ?
|
||||
new Stock("unknown", stockCount) :
|
||||
new Stock("mod-" + sku[0], stockCount);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.With;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class User {
|
||||
private final String username;
|
||||
private final String emailAddress;
|
||||
@With
|
||||
private final boolean isAuthenticated;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
|
||||
public class HolderUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenWithMethodsGenerated_thenUsable() {
|
||||
Holder value = new Holder("a", "b");
|
||||
|
||||
Holder valueModifiedA = value.withVariableA("mod-a");
|
||||
Holder valueModifiedB = value.with_variableB("mod-b");
|
||||
// Holder valueModifiedC = value.with$VariableC("mod-c"); not possible
|
||||
|
||||
assertNotSame(valueModifiedA, value);
|
||||
assertNotSame(valueModifiedB, value);
|
||||
assertEquals("mod-a", valueModifiedA.getVariableA());
|
||||
assertEquals("mod-b", valueModifiedB.get_variableB());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
public class ImprovedUserUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenUsernameNull_thenException() {
|
||||
ImprovedUser user = new ImprovedUser("testuser", "[email protected]");
|
||||
|
||||
assertThrows(NullPointerException.class, () -> user.withUsername(null));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEmailNull_thenException() {
|
||||
ImprovedUser user = new ImprovedUser("testuser", "[email protected]");
|
||||
|
||||
assertThrows(NullPointerException.class, () -> user.withEmailAddress(null));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class KioskDeviceWithUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenDeviceInspected_thenClonedAndUpdated() {
|
||||
KioskDevice device = new KioskDevice("S-001", false);
|
||||
|
||||
Device inspectedDevice = device.withInspected(true);
|
||||
|
||||
assertNotSame(inspectedDevice, device);
|
||||
assertFalse(device.isInspected());
|
||||
assertTrue(inspectedDevice.isInspected());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class StockWithUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenWithManuallyProvided_whenSkuChanged_thenManualMethodUsed() {
|
||||
Stock stock = new Stock("sku-001", 5);
|
||||
|
||||
Stock modifiedStock = stock.withSku("sku-002");
|
||||
Stock anotherModifiedStock = stock.withSKU("sku-003", "sku-004");
|
||||
|
||||
assertNotSame(modifiedStock, stock);
|
||||
assertNotSame(anotherModifiedStock, stock);
|
||||
assertTrue(modifiedStock.getSku().startsWith("mod"));
|
||||
assertTrue(anotherModifiedStock.getSku().startsWith("mod"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.baeldung.lombok.with;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotSame;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
public class UserWithUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenUserAuthenticated_thenClonedAndUpdated() {
|
||||
User immutableUser = new User("testuser", "[email protected]", false);
|
||||
|
||||
User authenticatedUser = immutableUser.withAuthenticated(true);
|
||||
|
||||
assertNotSame(immutableUser, authenticatedUser);
|
||||
assertFalse(immutableUser.isAuthenticated());
|
||||
assertTrue(authenticatedUser.isAuthenticated());
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -135,7 +135,8 @@
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<exec.mainClass>com.baeldung.micronaut.helloworld.server.ServerApplication</exec.mainClass>
|
||||
<!-- <exec.mainClass>com.baeldung.micronaut.helloworld.server.ServerApplication</exec.mainClass> -->
|
||||
<exec.mainClass>com.baeldung.micronaut.vs.springboot.CompareApplication</exec.mainClass>
|
||||
<micronaut.version>1.0.0.RC2</micronaut.version>
|
||||
<jdk.version>1.8</jdk.version>
|
||||
<annotation.api.version>1.3.2</annotation.api.version>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.baeldung.micronaut.vs.springboot;
|
||||
|
||||
import io.micronaut.runtime.Micronaut;
|
||||
|
||||
public class CompareApplication {
|
||||
public static void main(String[] args) {
|
||||
Micronaut.run(CompareApplication.class);
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.baeldung.micronaut.vs.springboot.client;
|
||||
|
||||
import io.micronaut.http.annotation.Get;
|
||||
import io.micronaut.http.client.annotation.Client;
|
||||
|
||||
@Client("/math")
|
||||
public interface ArithmeticClient {
|
||||
|
||||
@Get("/sum/{number1}/{number2}")
|
||||
String sum(float number1, float number2);
|
||||
|
||||
@Get("/subtract/{number1}/{number2}")
|
||||
String subtract(float number1, float number2);
|
||||
|
||||
@Get("/multiply/{number1}/{number2}")
|
||||
String multiply(float number1, float number2);
|
||||
|
||||
@Get("/divide/{number1}/{number2}")
|
||||
String divide(float number1, float number2);
|
||||
|
||||
@Get("/memory")
|
||||
String memory();
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.baeldung.micronaut.vs.springboot.client;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import io.micronaut.http.HttpRequest;
|
||||
import io.micronaut.http.client.RxHttpClient;
|
||||
import io.micronaut.http.client.annotation.Client;
|
||||
|
||||
@Singleton
|
||||
public class ArithmeticClientImpl {
|
||||
private RxHttpClient httpClient;
|
||||
|
||||
public ArithmeticClientImpl(@Client("/") RxHttpClient httpClient) {
|
||||
this.httpClient = httpClient;
|
||||
}
|
||||
|
||||
public String sum(float number1, float number2) {
|
||||
HttpRequest<String> req = HttpRequest.GET("/math/sum/" + number1 + "/" + number2);
|
||||
return httpClient.retrieve(req).blockingFirst();
|
||||
}
|
||||
|
||||
public String subtract(float number1, float number2) {
|
||||
HttpRequest<String> req = HttpRequest.GET("/math/subtract/" + number1 + "/" + number2);
|
||||
return httpClient.retrieve(req).blockingFirst();
|
||||
}
|
||||
|
||||
public String multiply(float number1, float number2) {
|
||||
HttpRequest<String> req = HttpRequest.GET("/math/multiply/" + number1 + "/" + number2);
|
||||
return httpClient.retrieve(req).blockingFirst();
|
||||
}
|
||||
|
||||
public String divide(float number1, float number2) {
|
||||
HttpRequest<String> req = HttpRequest.GET("/math/divide/" + number1 + "/" + number2);
|
||||
return httpClient.retrieve(req).blockingFirst();
|
||||
}
|
||||
|
||||
public String memory() {
|
||||
HttpRequest<String> req = HttpRequest.GET("/math/memory");
|
||||
return httpClient.retrieve(req).blockingFirst();
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.baeldung.micronaut.vs.springboot.controller;
|
||||
|
||||
import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.MemoryMXBean;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.baeldung.micronaut.vs.springboot.service.ArithmeticService;
|
||||
|
||||
import io.micronaut.http.annotation.Controller;
|
||||
import io.micronaut.http.annotation.Get;
|
||||
|
||||
@Controller("/math")
|
||||
public class ArithmeticController {
|
||||
@Inject
|
||||
private ArithmeticService arithmeticService;
|
||||
|
||||
@Get("/sum/{number1}/{number2}")
|
||||
public float getSum(float number1, float number2) {
|
||||
return arithmeticService.add(number1, number2);
|
||||
}
|
||||
|
||||
@Get("/subtract/{number1}/{number2}")
|
||||
public float getDifference(float number1, float number2) {
|
||||
return arithmeticService.subtract(number1, number2);
|
||||
}
|
||||
|
||||
@Get("/multiply/{number1}/{number2}")
|
||||
public float getMultiplication(float number1, float number2) {
|
||||
return arithmeticService.multiply(number1, number2);
|
||||
}
|
||||
|
||||
@Get("/divide/{number1}/{number2}")
|
||||
public float getDivision(float number1, float number2) {
|
||||
return arithmeticService.divide(number1, number2);
|
||||
}
|
||||
|
||||
@Get("/memory")
|
||||
public String getMemoryStatus() {
|
||||
MemoryMXBean memoryBean = ManagementFactory.getMemoryMXBean();
|
||||
String memoryStats = "";
|
||||
|
||||
String init = String.format("Initial: %.2f GB \n",
|
||||
(double)memoryBean.getHeapMemoryUsage().getInit() /1073741824);
|
||||
String usedHeap = String.format("Used: %.2f GB \n",
|
||||
(double)memoryBean.getHeapMemoryUsage().getUsed() /1073741824);
|
||||
String maxHeap = String.format("Max: %.2f GB \n",
|
||||
(double)memoryBean.getHeapMemoryUsage().getMax() /1073741824);
|
||||
String committed = String.format("Committed: %.2f GB \n",
|
||||
(double)memoryBean.getHeapMemoryUsage().getCommitted() /1073741824);
|
||||
memoryStats += init;
|
||||
memoryStats += usedHeap;
|
||||
memoryStats += maxHeap;
|
||||
memoryStats += committed;
|
||||
|
||||
return memoryStats;
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.baeldung.micronaut.vs.springboot.service;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class ArithmeticService {
|
||||
public float add(float number1, float number2) {
|
||||
return number1 + number2;
|
||||
}
|
||||
|
||||
public float subtract(float number1, float number2) {
|
||||
return number1 - number2;
|
||||
}
|
||||
|
||||
public float multiply(float number1, float number2) {
|
||||
return number1 * number2;
|
||||
}
|
||||
|
||||
public float divide(float number1, float number2) {
|
||||
if (number2 == 0) {
|
||||
throw new IllegalArgumentException("'number2' cannot be zero");
|
||||
}
|
||||
return number1 / number2;
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.baeldung.micronaut.vs.springboot;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
|
||||
import io.micronaut.context.ApplicationContext;
|
||||
import io.micronaut.runtime.server.EmbeddedServer;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.baeldung.micronaut.vs.springboot.client.ArithmeticClientImpl;
|
||||
|
||||
|
||||
public class ArithmeticClientUnitTest {
|
||||
private EmbeddedServer server;
|
||||
private ArithmeticClientImpl client;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
server = ApplicationContext.run(EmbeddedServer.class);
|
||||
client = server.getApplicationContext().getBean(ArithmeticClientImpl.class);
|
||||
}
|
||||
|
||||
@After
|
||||
public void cleanup() {
|
||||
server.stop();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoNumbers_whenAdd_thenCorrectAnswerReturned() {
|
||||
String expected = Float.valueOf(10 + 20).toString();
|
||||
assertEquals(expected, client.sum(10, 20));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoNumbers_whenSubtract_thenCorrectAnswerReturned() {
|
||||
String expected = Float.valueOf(20 - 10).toString();
|
||||
assertEquals(expected, client.subtract(20, 10));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoNumbers_whenMultiply_thenCorrectAnswerReturned() {
|
||||
String expected = Float.valueOf(10 * 20).toString();
|
||||
assertEquals(expected, client.multiply(10, 20));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenTwoNumbers_whenDivide_thenCorrectAnswerReturned() {
|
||||
String expected = Float.valueOf(30 / 10).toString();
|
||||
assertEquals(expected, client.divide(30, 10));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenMemory_thenCorrectAnswerReturned() {
|
||||
String expected = "Initial:";
|
||||
assertThat(client.memory(), containsString(expected));
|
||||
}
|
||||
}
|
||||
@@ -70,6 +70,7 @@
|
||||
<module>spring-boot-swagger</module>
|
||||
<module>spring-boot-swagger-jwt</module>
|
||||
<module>spring-boot-testing</module>
|
||||
<module>spring-boot-testing-2</module>
|
||||
<module>spring-boot-vue</module>
|
||||
<module>spring-boot-actuator</module>
|
||||
<module>spring-boot-data-2</module>
|
||||
|
||||
@@ -5,4 +5,5 @@ This module contains articles about Spring Boot annotations
|
||||
### Relevant Articles:
|
||||
|
||||
- [Spring Conditional Annotations](https://www.baeldung.com/spring-conditional-annotations)
|
||||
- [Guide to @SpringBootConfiguration in Spring Boot](https://www.baeldung.com/springbootconfiguration-annotation)
|
||||
- More articles: [[<-- prev]](/spring-boot-modules/spring-boot-annotations)
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
spring.main.web-application-type=none
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.springbootconfiguration;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class SpringContextTest {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
}
|
||||
@@ -9,5 +9,4 @@ This module contains articles about bootstrapping Spring Boot applications.
|
||||
- [Deploy a Spring Boot Application to Google App Engine](https://www.baeldung.com/spring-boot-google-app-engine)
|
||||
- [Deploy a Spring Boot Application to OpenShift](https://www.baeldung.com/spring-boot-deploy-openshift)
|
||||
- [Deploy a Spring Boot Application to AWS Beanstalk](https://www.baeldung.com/spring-boot-deploy-aws-beanstalk)
|
||||
- [Guide to @SpringBootConfiguration in Spring Boot](https://www.baeldung.com/springbootconfiguration-annotation)
|
||||
- [Implement Health Checks in OpenShift](https://www.baeldung.com/ops/openshift-health-checks)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user