Migrated the following modules, nos using parent-boot-2:
spring-protobuf spring-mockito spring-mustache spring-kafka spring-jooq spring-cucumber spring-aop spring-amqp-simple
This commit is contained in:
parent
29b4110b34
commit
a1b5d77656
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
spring:
|
||||
rabbitmq:
|
||||
username: guest
|
||||
password: guest
|
||||
host: localhost
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -30,11 +30,9 @@
|
|||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<spring-kafka.version>1.1.3.RELEASE</spring-kafka.version>
|
||||
<jackson.version>2.6.7</jackson.version>
|
||||
</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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -4,7 +4,9 @@ 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.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.http.converter.protobuf.ProtobufHttpMessageConverter;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
@ -17,6 +19,10 @@ import java.util.Map;
|
|||
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder(Application.class).run(args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
RestTemplate restTemplate(ProtobufHttpMessageConverter hmc) {
|
||||
|
|
Loading…
Reference in New Issue