Guest User

Untitled

a guest
Oct 22nd, 2018
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. Unable to deserialize [br.com.foo.Bar] using the contentType [application/x-java-object;type=br.com.foo.Bar] br.com.foo.Bar; nested exception is java.lang.ClassNotFoundException
  2.  
  3. @EnableBinding(CustomExchange.class)
  4. public class RabbitService {
  5.  
  6. @StreamListener(target = CustomExchange.INPUT)
  7. public void recievedMessage(Message<br.etc.Bar> msg) {
  8. try {
  9. Bar bar = msg.getPayload();
  10.  
  11. //faz algo
  12. } catch (Exception e) {
  13. // faz algo
  14. }
  15. }
  16. }
  17.  
  18. <dependency>
  19. <groupId>org.springframework.cloud</groupId>
  20. <artifactId>spring-cloud-stream-binder-rabbit</artifactId>
  21. <version>1.3.0.RELEASE</version>
  22. </dependency>
Add Comment
Please, Sign In to add comment