title: Register JavaTimeModule with the default objectmapper in springboot
body: <p>I define a <code>JavaTimeModule</code>:  </p>
  
  <pre><code>@Bean public Module java8TimeModule() {
      JavaTimeModule javaTimeModule = new JavaTimeModule();
      return javaTimeModule; 
  }
  </code></pre>
  
  <p>However, it does not register itself with the default objectmapper. I am using jackson-databind-2.8.9.jar.</p>
  
  <p>The online help of <code>JavaTimeModule()</code> in Eclipse IDE says that:</p>
  
  <blockquote>
    <p>Note that as of 2.6, this module does NOT support auto-registration. </p>
  </blockquote>
  
  <p>Not sure if it is still the same case for jackson-databind-2.8.9 causing <code>JavaTimeModule</code> not registering with the default objectmapper.</p>
  
  <p>I do not want to create a new objectmapper. As in the past when I tried this, I had another issue with the objectmapper I created.</p>
  
  <p>Springboot doc says:</p>
  
  <blockquote>
    <p>Defining a @Bean of type Jackson2ObjectMapperBuilder will allow you to customize both default ObjectMapper and XmlMapper.</p>
  </blockquote>
  
  <p>But I could not find code examples and not sure how to do it. </p>
  
  <p>If I define a <code>@Bean</code> of type <code>Jackson2ObjectMapperBuilder</code>, will it replace the default one? What is the consequence of it? And how to get the default objectmapper from <code>Jackson2ObjectMapperBuilder</code>?</p>