From 6fa4a43d39e8103bfaaa767322619c9e01267fe2 Mon Sep 17 00:00:00 2001 From: chernykhalexander Date: Sat, 16 Jul 2016 00:48:09 +0300 Subject: [PATCH 1/6] added spring boot starters module --- pom.xml | 1 + spring-boot-starters/.gitignore | 1 + spring-boot-starters/README.MD | 2 + spring-boot-starters/pom.xml | 91 +++++++++++++++++++ .../main/java/org/baeldung/Application.java | 16 ++++ .../controller/GenericEntityController.java | 38 ++++++++ .../org/baeldung/domain/GenericEntity.java | 42 +++++++++ .../repository/GenericEntityRepository.java | 7 ++ .../src/main/resources/application.properties | 2 + .../baeldung/SpringBootApplicationTest.java | 54 +++++++++++ .../java/org/baeldung/SpringBootJPATest.java | 27 ++++++ .../java/org/baeldung/SpringBootMailTest.java | 82 +++++++++++++++++ .../src/test/resources/application.properties | 3 + 13 files changed, 366 insertions(+) create mode 100644 spring-boot-starters/.gitignore create mode 100644 spring-boot-starters/README.MD create mode 100644 spring-boot-starters/pom.xml create mode 100644 spring-boot-starters/src/main/java/org/baeldung/Application.java create mode 100644 spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java create mode 100644 spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java create mode 100644 spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java create mode 100644 spring-boot-starters/src/main/resources/application.properties create mode 100644 spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java create mode 100644 spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java create mode 100644 spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java create mode 100644 spring-boot-starters/src/test/resources/application.properties diff --git a/pom.xml b/pom.xml index 1966d1485a..0bdba095c1 100644 --- a/pom.xml +++ b/pom.xml @@ -42,6 +42,7 @@ spring-apache-camel spring-batch spring-boot + spring-boot-starters spring-controller spring-data-cassandra spring-data-elasticsearch diff --git a/spring-boot-starters/.gitignore b/spring-boot-starters/.gitignore new file mode 100644 index 0000000000..b83d22266a --- /dev/null +++ b/spring-boot-starters/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/spring-boot-starters/README.MD b/spring-boot-starters/README.MD new file mode 100644 index 0000000000..2a87b46021 --- /dev/null +++ b/spring-boot-starters/README.MD @@ -0,0 +1,2 @@ +###The Course +The "REST With Spring" Classes: http://bit.ly/restwithspring diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml new file mode 100644 index 0000000000..87784e7690 --- /dev/null +++ b/spring-boot-starters/pom.xml @@ -0,0 +1,91 @@ + + 4.0.0 + com.baeldung + spring-boot-starters + 0.0.1-SNAPSHOT + Spring Boot Starters + This is simple boot application for Spring boot starters + + + + org.springframework.boot + spring-boot-starter-parent + 1.3.3.RELEASE + + + + UTF-8 + 1.8 + + + + org.springframework.boot + spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + com.jayway.jsonpath + json-path + test + + + org.springframework.boot + spring-boot-starter-data-jpa + + + com.h2database + h2 + runtime + + + org.springframework.boot + spring-boot-starter-mail + + + org.subethamail + subethasmtp + 3.1.7 + test + + + + + spring-boot + + + src/main/resources + true + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + + + + + + \ No newline at end of file diff --git a/spring-boot-starters/src/main/java/org/baeldung/Application.java b/spring-boot-starters/src/main/java/org/baeldung/Application.java new file mode 100644 index 0000000000..453264820f --- /dev/null +++ b/spring-boot-starters/src/main/java/org/baeldung/Application.java @@ -0,0 +1,16 @@ +package org.baeldung; + +import org.springframework.boot.SpringApplication; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; + +import java.util.Queue; + +@org.springframework.boot.autoconfigure.SpringBootApplication +public class Application { + private static ApplicationContext applicationContext; + + public static void main(String[] args) { + applicationContext = SpringApplication.run(Application.class, args); + } +} diff --git a/spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java b/spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java new file mode 100644 index 0000000000..b6f88e7cd5 --- /dev/null +++ b/spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java @@ -0,0 +1,38 @@ +package org.baeldung.controller; + +import org.baeldung.domain.GenericEntity; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.List; + +@RestController +public class GenericEntityController { + private List entityList = new ArrayList<>(); + + { + entityList.add(new GenericEntity(1l, "entity_1")); + entityList.add(new GenericEntity(2l, "entity_2")); + entityList.add(new GenericEntity(3l, "entity_3")); + entityList.add(new GenericEntity(4l, "entity_4")); + } + + @RequestMapping("/entity/all") + public List findAll() { + return entityList; + } + + @RequestMapping(value = "/entity", method = RequestMethod.POST) + public GenericEntity addEntity(GenericEntity entity) { + entityList.add(entity); + return entity; + } + + @RequestMapping("/entity/findby/{id}") + public GenericEntity findById(@PathVariable Long id) { + return entityList.stream().filter(entity -> entity.getId().equals(id)).findFirst().get(); + } +} diff --git a/spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java b/spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java new file mode 100644 index 0000000000..7b1d27cb66 --- /dev/null +++ b/spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java @@ -0,0 +1,42 @@ +package org.baeldung.domain; + +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; + +@Entity +public class GenericEntity { + @Id + @GeneratedValue(strategy = GenerationType.AUTO) + private Long id; + private String value; + + public GenericEntity() { + } + + public GenericEntity(String value) { + this.value = value; + } + + public GenericEntity(Long id, String value) { + this.id = id; + this.value = value; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java b/spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java new file mode 100644 index 0000000000..7bb1e6dcdc --- /dev/null +++ b/spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java @@ -0,0 +1,7 @@ +package org.baeldung.repository; + +import org.baeldung.domain.GenericEntity; +import org.springframework.data.jpa.repository.JpaRepository; + +public interface GenericEntityRepository extends JpaRepository { +} diff --git a/spring-boot-starters/src/main/resources/application.properties b/spring-boot-starters/src/main/resources/application.properties new file mode 100644 index 0000000000..6b0388e0c3 --- /dev/null +++ b/spring-boot-starters/src/main/resources/application.properties @@ -0,0 +1,2 @@ +server.port=8080 +server.contextPath=/springbootapp diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java b/spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java new file mode 100644 index 0000000000..fea5cbd057 --- /dev/null +++ b/spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java @@ -0,0 +1,54 @@ +package org.baeldung; + +import org.baeldung.domain.GenericEntity; +import org.baeldung.repository.GenericEntityRepository; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.SpringApplicationConfiguration; +import org.springframework.http.MediaType; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; +import org.springframework.test.web.servlet.result.MockMvcResultMatchers; +import org.springframework.test.web.servlet.setup.MockMvcBuilders; +import org.springframework.web.context.WebApplicationContext; + +import java.nio.charset.Charset; + +import static org.hamcrest.Matchers.hasSize; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; + +@RunWith(SpringJUnit4ClassRunner.class) +@SpringApplicationConfiguration(classes = Application.class) +@WebAppConfiguration +public class SpringBootApplicationTest { + @Autowired + private WebApplicationContext webApplicationContext; + private MockMvc mockMvc; + + + @Before + public void setupMockMvc() { + mockMvc = MockMvcBuilders.webAppContextSetup(webApplicationContext) + .build(); + } + + @Test + public void givenRequestHasBeenMade_whenMeetsAllOfGivenConditions_thenCorrect() throws Exception { + MediaType contentType = new MediaType(MediaType.APPLICATION_JSON.getType(), + MediaType.APPLICATION_JSON.getSubtype(), + Charset.forName("utf8")); + + mockMvc.perform(MockMvcRequestBuilders.get("/entity/all")). + andExpect(MockMvcResultMatchers.status().isOk()). + andExpect(MockMvcResultMatchers.content().contentType(contentType)). + andExpect(jsonPath("$", hasSize(4))); + } + + +} diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java b/spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java new file mode 100644 index 0000000000..8a6b5139fe --- /dev/null +++ b/spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java @@ -0,0 +1,27 @@ +package org.baeldung; + +import org.baeldung.domain.GenericEntity; +import org.baeldung.repository.GenericEntityRepository; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.SpringApplicationConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +@RunWith(SpringJUnit4ClassRunner.class) +@SpringApplicationConfiguration(classes = Application.class) +public class SpringBootJPATest { + @Autowired + private GenericEntityRepository genericEntityRepository; + + @Test + public void givenGenericEntityRepository_whenSaveAndRetreiveEntity_thenOK() { + GenericEntity genericEntity = genericEntityRepository.save(new GenericEntity("test")); + GenericEntity foundedEntity = genericEntityRepository.findOne(genericEntity.getId()); + assertNotNull(foundedEntity); + assertEquals(genericEntity.getValue(), foundedEntity.getValue()); + } +} diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java b/spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java new file mode 100644 index 0000000000..2e436ece2e --- /dev/null +++ b/spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java @@ -0,0 +1,82 @@ +package org.baeldung; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.SpringApplicationConfiguration; +import org.springframework.mail.SimpleMailMessage; +import org.springframework.mail.javamail.JavaMailSender; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.web.WebAppConfiguration; +import org.springframework.web.context.WebApplicationContext; +import org.subethamail.wiser.Wiser; +import org.subethamail.wiser.WiserMessage; + +import javax.mail.MessagingException; +import java.io.IOException; +import java.util.List; + +import static org.hamcrest.Matchers.hasSize; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +@RunWith(SpringJUnit4ClassRunner.class) +@SpringApplicationConfiguration(classes = Application.class) +public class SpringBootMailTest { + @Autowired + private JavaMailSender javaMailSender; + + private Wiser wiser; + + private String userTo = "user2@localhost"; + private String userFrom = "user1@localhost"; + private String subject = "Test subject"; + private String textMail = "Text subject mail"; + + @Before + public void setUp() throws Exception { + final int TEST_PORT = 25; + wiser = new Wiser(TEST_PORT); + wiser.start(); + } + + @After + public void tearDown() throws Exception { + wiser.stop(); + } + + @Test + public void givenMail_whenSendAndReceived_thenCorrect() throws Exception { + SimpleMailMessage message = composeEmailMessage(); + javaMailSender.send(message); + List messages = wiser.getMessages(); + + assertThat(messages, hasSize(1)); + WiserMessage wiserMessage = messages.get(0); + assertEquals(userFrom, wiserMessage.getEnvelopeSender()); + assertEquals(userTo, wiserMessage.getEnvelopeReceiver()); + assertEquals(subject, getSubject(wiserMessage)); + assertEquals(textMail, getMessage(wiserMessage)); + } + + private String getMessage(WiserMessage wiserMessage) throws MessagingException, IOException { + return wiserMessage.getMimeMessage().getContent().toString().trim(); + } + + private String getSubject(WiserMessage wiserMessage) throws MessagingException { + return wiserMessage.getMimeMessage().getSubject(); + } + + + private SimpleMailMessage composeEmailMessage() { + SimpleMailMessage mailMessage = new SimpleMailMessage(); + mailMessage.setTo(userTo); + mailMessage.setReplyTo(userFrom); + mailMessage.setFrom(userFrom); + mailMessage.setSubject(subject); + mailMessage.setText(textMail); + return mailMessage; + } +} diff --git a/spring-boot-starters/src/test/resources/application.properties b/spring-boot-starters/src/test/resources/application.properties new file mode 100644 index 0000000000..bcfcf4b2fb --- /dev/null +++ b/spring-boot-starters/src/test/resources/application.properties @@ -0,0 +1,3 @@ +spring.mail.host=localhost +spring.mail.port=25 +spring.mail.properties.mail.smtp.auth=false \ No newline at end of file From 0944745a02d3d6c597661787b5036dcd880064a9 Mon Sep 17 00:00:00 2001 From: chernykhalexander Date: Sat, 16 Jul 2016 00:51:09 +0300 Subject: [PATCH 2/6] comment out spring-boot-starters module in parent pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0bdba095c1..a8ff5602fc 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,7 @@ spring-apache-camel spring-batch spring-boot - spring-boot-starters + spring-controller spring-data-cassandra spring-data-elasticsearch From 3b8ec66168e93407d54e33c799e5550d6f4b9e0e Mon Sep 17 00:00:00 2001 From: Chernykh Alexander Date: Sat, 16 Jul 2016 01:02:56 +0300 Subject: [PATCH 3/6] removed module from pom.xml --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index a8ff5602fc..1966d1485a 100644 --- a/pom.xml +++ b/pom.xml @@ -42,7 +42,6 @@ spring-apache-camel spring-batch spring-boot - spring-controller spring-data-cassandra spring-data-elasticsearch From c960c2f2a87ca9ccc7d3db743f6aadea999d2f19 Mon Sep 17 00:00:00 2001 From: Chernykh Alexander Date: Sat, 16 Jul 2016 01:05:19 +0300 Subject: [PATCH 4/6] cleaned up whitespaces --- spring-boot-starters/pom.xml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml index 87784e7690..ae5d9c6617 100644 --- a/spring-boot-starters/pom.xml +++ b/spring-boot-starters/pom.xml @@ -68,12 +68,10 @@ - org.springframework.boot spring-boot-maven-plugin - org.apache.maven.plugins maven-compiler-plugin @@ -82,10 +80,6 @@ 1.8 - - - - - \ No newline at end of file + From e3c28f6dcda252a1dfd4e15cddd089c41b4cf83b Mon Sep 17 00:00:00 2001 From: chernykhalexander Date: Sat, 16 Jul 2016 01:38:48 +0300 Subject: [PATCH 5/6] merge into spring-boot module --- spring-boot-starters/.gitignore | 1 - spring-boot-starters/README.MD | 2 - spring-boot-starters/pom.xml | 85 ------------------- .../src/main/resources/application.properties | 2 - spring-boot/pom.xml | 20 +++++ .../main/java/org/baeldung/Application.java | 3 - .../controller/GenericEntityController.java | 0 .../org/baeldung/domain/GenericEntity.java | 0 .../repository/GenericEntityRepository.java | 0 .../src/main/resources/application.properties | 2 +- .../baeldung/SpringBootApplicationTest.java | 0 .../java/org/baeldung/SpringBootJPATest.java | 0 .../java/org/baeldung/SpringBootMailTest.java | 0 .../src/test/resources/application.properties | 0 14 files changed, 21 insertions(+), 94 deletions(-) delete mode 100644 spring-boot-starters/.gitignore delete mode 100644 spring-boot-starters/README.MD delete mode 100644 spring-boot-starters/pom.xml delete mode 100644 spring-boot-starters/src/main/resources/application.properties rename {spring-boot-starters => spring-boot}/src/main/java/org/baeldung/Application.java (84%) rename {spring-boot-starters => spring-boot}/src/main/java/org/baeldung/controller/GenericEntityController.java (100%) rename {spring-boot-starters => spring-boot}/src/main/java/org/baeldung/domain/GenericEntity.java (100%) rename {spring-boot-starters => spring-boot}/src/main/java/org/baeldung/repository/GenericEntityRepository.java (100%) rename {spring-boot-starters => spring-boot}/src/test/java/org/baeldung/SpringBootApplicationTest.java (100%) rename {spring-boot-starters => spring-boot}/src/test/java/org/baeldung/SpringBootJPATest.java (100%) rename {spring-boot-starters => spring-boot}/src/test/java/org/baeldung/SpringBootMailTest.java (100%) rename {spring-boot-starters => spring-boot}/src/test/resources/application.properties (100%) diff --git a/spring-boot-starters/.gitignore b/spring-boot-starters/.gitignore deleted file mode 100644 index b83d22266a..0000000000 --- a/spring-boot-starters/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target/ diff --git a/spring-boot-starters/README.MD b/spring-boot-starters/README.MD deleted file mode 100644 index 2a87b46021..0000000000 --- a/spring-boot-starters/README.MD +++ /dev/null @@ -1,2 +0,0 @@ -###The Course -The "REST With Spring" Classes: http://bit.ly/restwithspring diff --git a/spring-boot-starters/pom.xml b/spring-boot-starters/pom.xml deleted file mode 100644 index ae5d9c6617..0000000000 --- a/spring-boot-starters/pom.xml +++ /dev/null @@ -1,85 +0,0 @@ - - 4.0.0 - com.baeldung - spring-boot-starters - 0.0.1-SNAPSHOT - Spring Boot Starters - This is simple boot application for Spring boot starters - - - - org.springframework.boot - spring-boot-starter-parent - 1.3.3.RELEASE - - - - UTF-8 - 1.8 - - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-test - test - - - com.jayway.jsonpath - json-path - test - - - org.springframework.boot - spring-boot-starter-data-jpa - - - com.h2database - h2 - runtime - - - org.springframework.boot - spring-boot-starter-mail - - - org.subethamail - subethasmtp - 3.1.7 - test - - - - - spring-boot - - - src/main/resources - true - - - - - - org.springframework.boot - spring-boot-maven-plugin - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - diff --git a/spring-boot-starters/src/main/resources/application.properties b/spring-boot-starters/src/main/resources/application.properties deleted file mode 100644 index 6b0388e0c3..0000000000 --- a/spring-boot-starters/src/main/resources/application.properties +++ /dev/null @@ -1,2 +0,0 @@ -server.port=8080 -server.contextPath=/springbootapp diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index 368dfa19c1..4ac008cfc8 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -60,6 +60,26 @@ spring-boot-starter-test test + + + org.springframework.boot + spring-boot-starter + + + com.jayway.jsonpath + json-path + test + + + org.springframework.boot + spring-boot-starter-mail + + + org.subethamail + subethasmtp + 3.1.7 + test + diff --git a/spring-boot-starters/src/main/java/org/baeldung/Application.java b/spring-boot/src/main/java/org/baeldung/Application.java similarity index 84% rename from spring-boot-starters/src/main/java/org/baeldung/Application.java rename to spring-boot/src/main/java/org/baeldung/Application.java index 453264820f..aae0c427a9 100644 --- a/spring-boot-starters/src/main/java/org/baeldung/Application.java +++ b/spring-boot/src/main/java/org/baeldung/Application.java @@ -2,9 +2,6 @@ package org.baeldung; import org.springframework.boot.SpringApplication; import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; - -import java.util.Queue; @org.springframework.boot.autoconfigure.SpringBootApplication public class Application { diff --git a/spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java b/spring-boot/src/main/java/org/baeldung/controller/GenericEntityController.java similarity index 100% rename from spring-boot-starters/src/main/java/org/baeldung/controller/GenericEntityController.java rename to spring-boot/src/main/java/org/baeldung/controller/GenericEntityController.java diff --git a/spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java b/spring-boot/src/main/java/org/baeldung/domain/GenericEntity.java similarity index 100% rename from spring-boot-starters/src/main/java/org/baeldung/domain/GenericEntity.java rename to spring-boot/src/main/java/org/baeldung/domain/GenericEntity.java diff --git a/spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java b/spring-boot/src/main/java/org/baeldung/repository/GenericEntityRepository.java similarity index 100% rename from spring-boot-starters/src/main/java/org/baeldung/repository/GenericEntityRepository.java rename to spring-boot/src/main/java/org/baeldung/repository/GenericEntityRepository.java diff --git a/spring-boot/src/main/resources/application.properties b/spring-boot/src/main/resources/application.properties index 8ee0ed29bc..78bcf4cc05 100644 --- a/spring-boot/src/main/resources/application.properties +++ b/spring-boot/src/main/resources/application.properties @@ -1,4 +1,4 @@ -server.port=8083 +server.port=8080 server.contextPath=/springbootapp management.port=8081 management.address=127.0.0.1 diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java b/spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java similarity index 100% rename from spring-boot-starters/src/test/java/org/baeldung/SpringBootApplicationTest.java rename to spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java b/spring-boot/src/test/java/org/baeldung/SpringBootJPATest.java similarity index 100% rename from spring-boot-starters/src/test/java/org/baeldung/SpringBootJPATest.java rename to spring-boot/src/test/java/org/baeldung/SpringBootJPATest.java diff --git a/spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java b/spring-boot/src/test/java/org/baeldung/SpringBootMailTest.java similarity index 100% rename from spring-boot-starters/src/test/java/org/baeldung/SpringBootMailTest.java rename to spring-boot/src/test/java/org/baeldung/SpringBootMailTest.java diff --git a/spring-boot-starters/src/test/resources/application.properties b/spring-boot/src/test/resources/application.properties similarity index 100% rename from spring-boot-starters/src/test/resources/application.properties rename to spring-boot/src/test/resources/application.properties From 5b28a3c19a8c144ebee83e500c9a269997c73f27 Mon Sep 17 00:00:00 2001 From: Chernykh Alexander Date: Sat, 16 Jul 2016 01:47:48 +0300 Subject: [PATCH 6/6] fixed whitespaces --- .../src/test/java/org/baeldung/SpringBootApplicationTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java b/spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java index fea5cbd057..ac7bcd62a9 100644 --- a/spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java +++ b/spring-boot/src/test/java/org/baeldung/SpringBootApplicationTest.java @@ -49,6 +49,4 @@ public class SpringBootApplicationTest { andExpect(MockMvcResultMatchers.content().contentType(contentType)). andExpect(jsonPath("$", hasSize(4))); } - - }