Merge pull request #5969 from rozagerardo/geroza/BAEL-9523_migrate-projects-to-paren-t-pom-2
[BAEL-9523] | Migrate modules from parent-boot-1 to parent-boot-2
This commit is contained in:
commit
5a0de6091b
@ -7,10 +7,10 @@
|
||||
<name>mustache</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -30,6 +30,11 @@
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${log4j.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
|
@ -0,0 +1 @@
|
||||
spring.mustache.suffix:.html
|
@ -8,10 +8,10 @@
|
||||
<name>spring-amqp-simple</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -35,7 +35,7 @@ public class SpringAmqpConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
SimpleMessageListenerContainer container(ConnectionFactory connectionFactory,
|
||||
SimpleMessageListenerContainer springAmqpContainer(ConnectionFactory connectionFactory,
|
||||
MessageListenerAdapter listenerAdapter) {
|
||||
SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
|
||||
container.setConnectionFactory(connectionFactory);
|
||||
|
@ -61,7 +61,7 @@ public class BroadcastConfig {
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SimpleRabbitListenerContainerFactory container(ConnectionFactory connectionFactory, SimpleRabbitListenerContainerFactoryConfigurer configurer) {
|
||||
public SimpleRabbitListenerContainerFactory broadcastContainer(ConnectionFactory connectionFactory, SimpleRabbitListenerContainerFactoryConfigurer configurer) {
|
||||
SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory();
|
||||
configurer.configure(factory, connectionFactory);
|
||||
return factory;
|
||||
|
@ -9,7 +9,7 @@ import com.baeldung.springamqpsimple.SpringAmqpApplication;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = SpringAmqpApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextManualTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
5
spring-amqp-simple/src/test/resources/application.yaml
Normal file
5
spring-amqp-simple/src/test/resources/application.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
spring:
|
||||
rabbitmq:
|
||||
username: guest
|
||||
password: guest
|
||||
host: localhost
|
@ -6,10 +6,10 @@
|
||||
<name>spring-aop</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -5,10 +5,10 @@ import java.util.Map;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
@ -5,10 +5,10 @@ import java.util.Map;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
@ -45,10 +45,10 @@ public class EmployeeControllerIntegrationTest {
|
||||
@Test
|
||||
public void whenPostEmployee_thenCreateEmployee() throws Exception {
|
||||
Employee alex = new Employee("alex");
|
||||
given(service.save(Mockito.anyObject())).willReturn(alex);
|
||||
given(service.save(Mockito.any())).willReturn(alex);
|
||||
|
||||
mvc.perform(post("/api/employees").contentType(MediaType.APPLICATION_JSON).content(JsonUtil.toJson(alex))).andExpect(status().isCreated()).andExpect(jsonPath("$.name", is("alex")));
|
||||
verify(service, VerificationModeFactory.times(1)).save(Mockito.anyObject());
|
||||
verify(service, VerificationModeFactory.times(1)).save(Mockito.any());
|
||||
reset(service);
|
||||
}
|
||||
|
||||
|
@ -10,10 +10,10 @@
|
||||
<description>Demo project for Spring Boot</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -5,10 +5,10 @@
|
||||
<name>spring-jooq</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -129,6 +129,9 @@
|
||||
<packageName>com.baeldung.jooq.introduction.db</packageName>
|
||||
<directory>src/main/java</directory>
|
||||
</target>
|
||||
<database>
|
||||
<inputCatalog></inputCatalog>
|
||||
</database>
|
||||
</generator>
|
||||
</configuration>
|
||||
</execution>
|
||||
@ -185,14 +188,12 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<properties>
|
||||
<org.jooq.version>3.8.6</org.jooq.version>
|
||||
<org.jooq.version>3.11.7</org.jooq.version>
|
||||
<com.h2database.version>1.4.193</com.h2database.version>
|
||||
<org.springframework.version>4.3.17.RELEASE</org.springframework.version>
|
||||
|
||||
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
|
||||
<sql-maven-plugin.version>1.5</sql-maven-plugin.version>
|
||||
<properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
|
||||
<spring-boot.version>1.5.13.RELEASE</spring-boot.version>
|
||||
<start-class>org.jooq.example.spring.Application</start-class>
|
||||
</properties>
|
||||
|
||||
|
@ -8,10 +8,10 @@
|
||||
<description>Intro to Kafka with Spring</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -30,7 +30,6 @@
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
|
@ -22,7 +22,7 @@ public class KafkaApplication {
|
||||
public static void main(String[] args) throws Exception {
|
||||
|
||||
ConfigurableApplicationContext context = SpringApplication.run(KafkaApplication.class, args);
|
||||
|
||||
|
||||
MessageProducer producer = context.getBean(MessageProducer.class);
|
||||
MessageListener listener = context.getBean(MessageListener.class);
|
||||
/*
|
||||
@ -102,7 +102,7 @@ public class KafkaApplication {
|
||||
}
|
||||
|
||||
public void sendMessageToPartion(String message, int partition) {
|
||||
kafkaTemplate.send(partionedTopicName, partition, message);
|
||||
kafkaTemplate.send(partionedTopicName, partition, null, message);
|
||||
}
|
||||
|
||||
public void sendMessageToFiltered(String message) {
|
||||
@ -124,13 +124,13 @@ public class KafkaApplication {
|
||||
|
||||
private CountDownLatch greetingLatch = new CountDownLatch(1);
|
||||
|
||||
@KafkaListener(topics = "${message.topic.name}", group = "foo", containerFactory = "fooKafkaListenerContainerFactory")
|
||||
@KafkaListener(topics = "${message.topic.name}", groupId = "foo", containerFactory = "fooKafkaListenerContainerFactory")
|
||||
public void listenGroupFoo(String message) {
|
||||
System.out.println("Received Messasge in group 'foo': " + message);
|
||||
latch.countDown();
|
||||
}
|
||||
|
||||
@KafkaListener(topics = "${message.topic.name}", group = "bar", containerFactory = "barKafkaListenerContainerFactory")
|
||||
@KafkaListener(topics = "${message.topic.name}", groupId = "bar", containerFactory = "barKafkaListenerContainerFactory")
|
||||
public void listenGroupBar(String message) {
|
||||
System.out.println("Received Messasge in group 'bar': " + message);
|
||||
latch.countDown();
|
||||
|
@ -9,7 +9,7 @@ import com.baeldung.spring.kafka.KafkaApplication;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = KafkaApplication.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextManualTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
@ -11,10 +11,10 @@
|
||||
<description>Injecting Mockito Mocks into Spring Beans</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -11,7 +11,7 @@ import org.springframework.context.annotation.Profile;
|
||||
public class NameServiceTestConfiguration {
|
||||
@Bean
|
||||
@Primary
|
||||
public NameService nameService() {
|
||||
public NameService nameServiceTest() {
|
||||
return Mockito.mock(NameService.class);
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,10 @@
|
||||
<name>spring-protobuf</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -36,21 +36,10 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<properties>
|
||||
<protobuf-java.version>3.1.0</protobuf-java.version>
|
||||
<protobuf-java-format.version>1.4</protobuf-java-format.version>
|
||||
<start-class>com.baeldung.protobuf.Application</start-class>
|
||||
</properties>
|
||||
|
||||
</project>
|
||||
|
@ -1,22 +1,28 @@
|
||||
package com.baeldung.protobuf;
|
||||
|
||||
import com.baeldung.protobuf.BaeldungTraining.Course;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student.PhoneNumber;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student.PhoneType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import com.baeldung.protobuf.BaeldungTraining.Course;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student.PhoneNumber;
|
||||
import com.baeldung.protobuf.BaeldungTraining.Student.PhoneType;
|
||||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
RestTemplate restTemplate(ProtobufHttpMessageConverter hmc) {
|
||||
|
@ -16,12 +16,14 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import com.baeldung.protobuf.BaeldungTraining.Course;
|
||||
import com.googlecode.protobuf.format.JsonFormat;
|
||||
|
||||
@DirtiesContext
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@SpringBootTest(classes = Application.class, webEnvironment = WebEnvironment.DEFINED_PORT)
|
||||
public class ApplicationIntegrationTest {
|
||||
|
@ -3,10 +3,12 @@ package org.baeldung;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
import com.baeldung.protobuf.Application;
|
||||
|
||||
@DirtiesContext
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = Application.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
|
@ -11,10 +11,10 @@
|
||||
<description>Demo project for Scheduling in Spring with Quartz</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -9,10 +9,10 @@
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
@ -27,7 +27,12 @@
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-bus</artifactId>
|
||||
<version>2.0.8.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.projectreactor</groupId>
|
||||
<artifactId>reactor-core</artifactId>
|
||||
<version>2.0.8.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -1,14 +1,16 @@
|
||||
package com.baeldung.controller;
|
||||
|
||||
import com.baeldung.doman.NotificationData;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.baeldung.doman.NotificationData;
|
||||
|
||||
import reactor.bus.Event;
|
||||
import reactor.bus.EventBus;
|
||||
|
||||
@Controller
|
||||
@RestController
|
||||
public class NotificationController {
|
||||
|
||||
@Autowired
|
||||
|
@ -7,13 +7,14 @@
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>spring-remoting</name>
|
||||
<description>Parent for all projects related to Spring Remoting.</description>
|
||||
<description>Parent for all projects related to Spring Remoting, except remoting-hessian-burlap</description>
|
||||
<!-- remoting-hessian-burlap needs to stick to spring-boot-1, some classes were removed in spring 5 -->
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencyManagement>
|
||||
@ -28,8 +29,8 @@
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>remoting-http</module>
|
||||
<module>remoting-hessian-burlap</module>
|
||||
<module>remoting-http</module>
|
||||
<module>remoting-amqp</module>
|
||||
<module>remoting-jms</module>
|
||||
<module>remoting-rmi</module>
|
||||
|
@ -9,7 +9,7 @@ import com.baeldung.server.AmqpServer;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(classes = AmqpServer.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextManualTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
@ -6,11 +6,13 @@
|
||||
<artifactId>remoting-hessian-burlap</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<name>remoting-hessian-burlap</name>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<artifactId>spring-remoting</artifactId>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-1</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
|
@ -9,7 +9,7 @@ import com.baeldung.server.JmsServer;
|
||||
|
||||
@SpringBootTest(classes = JmsServer.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextManualTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
@ -9,7 +9,7 @@ import com.baeldung.client.RmiClient;
|
||||
|
||||
@SpringBootTest(classes = RmiClient.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class SpringContextIntegrationTest {
|
||||
public class SpringContextLiveTest {
|
||||
|
||||
@Test
|
||||
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
|
@ -9,10 +9,10 @@
|
||||
<name>spring-sleuth</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -8,10 +8,10 @@
|
||||
<description>A demo project with vertx spring integration</description>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -1,7 +1,8 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<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>
|
||||
|
||||
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>spring-zuul</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
@ -9,10 +10,10 @@
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-boot-1</artifactId>
|
||||
<artifactId>parent-boot-2</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../parent-boot-1</relativePath>
|
||||
<relativePath>../parent-boot-2</relativePath>
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
@ -38,11 +39,22 @@
|
||||
|
||||
<properties>
|
||||
<!-- Spring -->
|
||||
<spring-cloud.version>1.2.7.RELEASE</spring-cloud.version>
|
||||
<spring-cloud.version>2.1.0.RC3</spring-cloud.version>
|
||||
<!-- util -->
|
||||
<commons-lang3.version>3.5</commons-lang3.version>
|
||||
<!-- Maven plugins -->
|
||||
<maven-war-plugin.version>2.6</maven-war-plugin.version>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>http://repo.spring.io/milestone</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
@ -2,7 +2,7 @@ package org.baeldung.config;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ResourceServerApplication extends SpringBootServletInitializer {
|
||||
|
@ -3,11 +3,11 @@ package org.baeldung.config;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@ComponentScan({ "org.baeldung.web.controller" })
|
||||
public class ResourceServerWebConfig extends WebMvcConfigurerAdapter {
|
||||
public class ResourceServerWebConfig implements WebMvcConfigurer {
|
||||
|
||||
}
|
||||
|
@ -1,2 +1,2 @@
|
||||
server.contextPath=/spring-zuul-foos-resource
|
||||
server.port=8081
|
||||
server.servlet.context-path=/spring-zuul-foos-resource
|
||||
server.port=8081
|
||||
|
@ -15,7 +15,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-zuul</artifactId>
|
||||
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
|
||||
<version>${spring-cloud.version}</version>
|
||||
</dependency>
|
||||
<!-- <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-netflix-core</artifactId> <version>1.0.4.RELEASE</version> </dependency> -->
|
||||
|
@ -2,7 +2,7 @@ package org.baeldung.config;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.support.SpringBootServletInitializer;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
|
||||
|
||||
@EnableZuulProxy
|
||||
|
@ -7,11 +7,11 @@ import org.springframework.web.servlet.config.annotation.DefaultServletHandlerCo
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
public class UiWebConfig extends WebMvcConfigurerAdapter {
|
||||
public class UiWebConfig implements WebMvcConfigurer {
|
||||
|
||||
@Bean
|
||||
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
|
||||
@ -25,7 +25,6 @@ public class UiWebConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
public void addViewControllers(final ViewControllerRegistry registry) {
|
||||
super.addViewControllers(registry);
|
||||
registry.addViewController("/").setViewName("forward:/index");
|
||||
registry.addViewController("/index");
|
||||
registry.addViewController("/login");
|
||||
|
Loading…
x
Reference in New Issue
Block a user