<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mel</title>
    <description>The latest articles on DEV Community by Mel (@msgallosa).</description>
    <link>https://dev.to/msgallosa</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F465007%2Fbf5a23d0-2125-4750-9472-135a760e3c69.jpg</url>
      <title>DEV Community: Mel</title>
      <link>https://dev.to/msgallosa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/msgallosa"/>
    <language>en</language>
    <item>
      <title>Configure MappingJackson2MessageConverter's ObjectMapper</title>
      <dc:creator>Mel</dc:creator>
      <pubDate>Mon, 07 Sep 2020 16:40:58 +0000</pubDate>
      <link>https://dev.to/msgallosa/configuring-mappingjackson2messageconverter-s-objectmapper-170k</link>
      <guid>https://dev.to/msgallosa/configuring-mappingjackson2messageconverter-s-objectmapper-170k</guid>
      <description>&lt;p&gt;In our service, we are expecting a &lt;code&gt;ZonedDateTime&lt;/code&gt; data type from a queue (AWS SQS) message (that is subscribed to a AWS SNS) to be mapped in our POJO.&lt;/p&gt;

&lt;p&gt;I kept getting this error&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Caused by: org.springframework.messaging.converter.MessageConversionException: Could not read JSON: Cannot construct instance of `java.time.ZonedDateTime` (no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value ('2020-09-07T18:02:51.099+0000')
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I thought that the solution was to override the &lt;code&gt;ObjectMapper&lt;/code&gt; to be able to register the module &lt;code&gt;JavaTimeModule&lt;/code&gt; so the message could be deserialized.&lt;br&gt;
The solution was right but it still didn't solve the error.&lt;br&gt;
I came to a realization (by the help of my coworker) that since we're using Spring Cloud to receive the message from the queue, messages that are received are handled by &lt;code&gt;MappingJackson2MessageConverter&lt;/code&gt;.&lt;br&gt;
&lt;a href="https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jms/support/converter/MappingJackson2MessageConverter.html"&gt;https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jms/support/converter/MappingJackson2MessageConverter.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The solution was to configure the &lt;code&gt;MappingJackson2MessageConverter&lt;/code&gt;'s object mapper (see to it that your &lt;code&gt;ObjectMapper&lt;/code&gt; has a &lt;code&gt;JavaTimeModule&lt;/code&gt;), and set other configurations as well.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Bean
public MappingJackson2MessageConverter mappingJackson2MessageConverter(ObjectMapper objectMapper) {
    MappingJackson2MessageConverter jacksonMessageConverter = new MappingJackson2MessageConverter();
    jacksonMessageConverter.setObjectMapper(objectMapper);
    jacksonMessageConverter.setSerializedPayloadClass(String.class);
    jacksonMessageConverter.setStrictContentTypeMatch(true);
    return jacksonMessageConverter;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Hope this post helped you in any way!&lt;/p&gt;

</description>
      <category>java</category>
      <category>springboot</category>
      <category>springcloud</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Blog for a back-end developer's portfolio?</title>
      <dc:creator>Mel</dc:creator>
      <pubDate>Mon, 07 Sep 2020 12:13:36 +0000</pubDate>
      <link>https://dev.to/msgallosa/blog-post-for-a-back-end-developer-portfolio-47dg</link>
      <guid>https://dev.to/msgallosa/blog-post-for-a-back-end-developer-portfolio-47dg</guid>
      <description>&lt;p&gt;Recently, I've noticed that most job postings require portfolios even if they're looking for back-end developers.&lt;br&gt;
So I thought... maybe I should start creating a public GitHub account to use it as my portfolio as a Software Engineer.&lt;/p&gt;

&lt;p&gt;But for me, it still doesn't make sense. I still need to make a front-end side for my back-end code and honestly, I'm not that good in front-end (no offense, Angular). I know a little Angular but I'm more interested on what happens on the back-end of every click of a user.&lt;/p&gt;

&lt;p&gt;I saw a post somewhere (or was it a discord message? :think:) that maybe a blog will be a great portfolio for a back-end developer.&lt;/p&gt;

&lt;p&gt;I'm no writer, and I'm not an expert at any language. This account is just made to document any random experience that I think would help other people in this community.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;

</description>
      <category>java</category>
      <category>womenintech</category>
      <category>writing</category>
    </item>
  </channel>
</rss>
