title: java.sql.Timestamp value; nested exception is java.sql.SQLDataException in Spring-boot project
body: <p>I'm building a project with spring boots, checking the status of the Internet through control, and I'm in the process of a DB connection. </p>
  
  <p>I'm trying to do '<strong>MyBatis</strong>', but there's an error.</p>
  
  <p>This is a list of my directories:
  <a href="https://i.stack.imgur.com/Gzqi5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gzqi5.png" alt="directories"></a></p>
  
  <p><strong>MinitoringdataApplication.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot;
  
  import org.mybatis.spring.annotation.MapperScan;
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication
  @MapperScan(basePackages = "com.smartcore.mn.springboot")
  public class MinitoringdataApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(MinitoringdataApplication.class, args);
      }
  
  }
  </code></pre>
  
  <p><strong>ServletInitializer.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot;
  
  import org.springframework.boot.builder.SpringApplicationBuilder;
  import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
  
  public class ServletInitializer extends SpringBootServletInitializer {
  
      @Override
      protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
          return application.sources(MinitoringdataApplication.class);
      }
  
  }
  </code></pre>
  
  <p><strong>ApiController.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot.controller;
  
  import java.time.LocalDateTime;
  import java.time.format.DateTimeFormatter;
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.web.bind.annotation.GetMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  import com.smartcore.mn.springboot.model.Member;
  import com.smartcore.mn.springboot.service.MemberService;
  
  @RestController
  public class ApiController {
  
      @Autowired
      MemberService memberService;
  
  
      @GetMapping(path = "/helloWorld")
      public String helloWorld() {
          return LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);
      }
  
      @GetMapping(path = "/db")
      public List&lt;Member&gt; selectAllMember() {
           List&lt;Member&gt; members = memberService.getAllMember();
           return members;
      }
  
  }
  </code></pre>
  
  <p><strong>MemberMapper.interface</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot.mapper;
  
  import java.util.List;
  
  import org.apache.ibatis.annotations.Mapper;
  
  import com.smartcore.mn.springboot.model.Member;
  
  @Mapper
  public interface MemberMapper {
      Member selectMemberById(Long id);
      List&lt;Member&gt; selectAllMember();
      void insertMember(Member member);
  
  }
  </code></pre>
  
  <p><strong>Member.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot.model;
  
  import java.util.Date;
  
  import org.apache.ibatis.type.Alias;
  
  import com.smartcore.mn.springboot.Exception.IdPasswordNotMatchingException;
  
  import lombok.Data;
  
  
  @Data
  @Alias("member")
  public class Member {
  
      private Long id;
      private String email;
      private String password;
      private String name;
      private Date registerDate;
  
      public Member(String email, String password, String name, Date registerDate) {
          this.email = email;
          this.password = password;
          this.name = name;
          this.registerDate = registerDate;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public Long getId() {
          return id;
      }
  
      public String getEmail() {
          return email;
      }
  
      public String getPassword() {
          return password;
      }
  
      public String getName() {
          return name;
      }
  
      public Date getRegisterDate() {
          return registerDate;
      }
  
      public void changePassword(String oldPassword, String newPassword) {
          if (!password.equals(oldPassword))
              throw new IdPasswordNotMatchingException();
          this.password = newPassword;
      }
  
  }
  </code></pre>
  
  <p><strong>MemberService.java</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>package com.smartcore.mn.springboot.service;
  
  import java.util.List;
  
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.stereotype.Service;
  import org.springframework.transaction.annotation.Transactional;
  
  import com.smartcore.mn.springboot.mapper.MemberMapper;
  import com.smartcore.mn.springboot.model.Member;
  
  @Service
  @Transactional
  public class MemberService {
  
      @Autowired
      MemberMapper memberMapper;
  
      public Member getMemberById(Long id) {
          return memberMapper.selectMemberById(id);
      }
  
      public List&lt;Member&gt; getAllMember() {
          return memberMapper.selectAllMember();
      }
  
      public void addMember(Member member) {
          memberMapper.insertMember(member);
      }
  
  }
  </code></pre>
  
  <p><strong>application.properties</strong></p>
  
  <pre><code>spring.datasource.url=jdbc:mysql://localhost/mydb?serverTimezone=UTC&amp;autoReconnection=true
  spring.datasource.username=mydb
  spring.datasource.password=mydb
  spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
  mybatis.type-aliases-package=com.smartcore.mn.springboot.model
  logging.level.com.smartcore.mn.springboot.mapper=TRACE
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/cI3YH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cI3YH.png" alt="xmlfile"></a></p>
  
  <p>MemberMapper.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt;
  
  &lt;mapper namespace="com.smartcore.mn.springboot.mapper.MemberMapper"&gt;
  
      &lt;select id="selectMemberById" resultType="member"&gt;
           SELECT * 
           FROM MEMBER 
           WHERE ID = #{id}
      &lt;/select&gt;
  
      &lt;select id="selectAllMember" resultType="member"&gt;
            SELECT * 
            FROM MEMBER
      &lt;/select&gt;
  
      &lt;insert id="insertMember"&gt;
        INSERT INTO MEMBER (EMAIL, PASSWORD, NAME, REGDATE)
        VALUES (#{email}, #{password}, #{name}, #{registerDate})
      &lt;/insert&gt;
  
  &lt;/mapper&gt;
  </code></pre>
  
  <p><strong><a href="http://localhost:8080/helloworld" rel="nofollow noreferrer">http://localhost:8080/helloworld</a></strong> is works normally.</p>
  
  <p>But  <strong><a href="http://localhost:8080/db" rel="nofollow noreferrer">http://localhost:8080/db</a></strong> have see Error</p>
  
  <p><a href="https://i.stack.imgur.com/P3cjm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P3cjm.png" alt="db connect"></a></p>
  
  <p>I need your solution. Thank you in advance.</p>
  
  <p><strong>my TABLE</strong></p>
  
  <p><a href="https://i.stack.imgur.com/l40Bu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l40Bu.png" alt="enter image description here"></a></p>