Skip to content

Commit

Permalink
Configuring JMS.
Browse files Browse the repository at this point in the history
  • Loading branch information
aminmb37 committed Nov 3, 2020
1 parent 0a819e4 commit 2ecaad6
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,11 @@
<name>mssc-beer-inventory-service</name>
<description>MSSC Beer Inventory Service</description>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-artemis</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package guru.sfg.beer.inventory.service.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jms.support.converter.MappingJackson2MessageConverter;
import org.springframework.jms.support.converter.MessageConverter;
import org.springframework.jms.support.converter.MessageType;

@Configuration
public class JmsConfig {
@Bean
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
}
5 changes: 4 additions & 1 deletion src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
logging.level.guru=debug
server.port=8082
server.port=
#artemis docker image user & pass
spring.artemis.user=artemis
spring.artemis.password=simetraehcapa

0 comments on commit 2ecaad6

Please sign in to comment.