避免溢位計算

java.lang.Math;

Math.addExact(Long.MAX_VALUE-1L, 2L); //計算溢位

throw java.lang.ArithmeticException: long overflow




文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

error by

Servlet.service() for servlet [dispatcherServlet] in context with path [/testweb] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/mem/prof/view], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/mem/prof/view], template might not exist or might not be accessible by any of the configured Template Resolvers
    at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869)
    at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:607)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098)
    at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072)

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

java.time.LocalDateTime to java.util.Date

import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

import org.junit.Test;

public class LocalDateTimeTest {
        
        @Test   
        public void toDate(){

          LocalDateTime testLDT = LocalDateTime.now();
          Date testD = Date.from(testLDT.atZone(ZoneId.systemDefault()).toInstant());
          
          System.out.println(testD.toString());

          LocalDateTime testLDT2 = LocalDateTime.ofInstant(testD.toInstant(), ZoneId.systemDefault());
          System.out.println(testLDT2.toString());
        }

}

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

國內旅行繼續進行中,以下是個人整理完,值得參考住宿的飯店方案
主要考慮目標飯店是下殺額度比較高、一般比較不會有機會住的飯店。

image

 福華飯店 

  1. 「萬聖節搗蛋趣專案
    https://www.howard-hotels.com.tw/zh_TW/Promo/506

訂房日期:~2021/10/16
入住日期:2021/10/18~2021/10/31

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

  台北: 

Le Méridien Taipei 台北寒舍艾美酒店 class6
https://www.facebook.com/LM.taipei/

W Taipei class6
https://www.facebook.com/wtaipei/

HOTEL PROVERBS TAIPEI 賦樂旅居 (Design Hotels™ ) class5

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

spring data jpa error

org.hibernate.QueryException: Named parameter not bound : __$synthetic$__25

 

處理方式:
spring-data-commons升版


官方ISSUE:
Avoid potentially expensive constructor parameter creation where possible

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()

ANA大概每個月初會決定下個月的飛機飛行狀況,可以參考 https://www.ana.co.jp/zh/tw/topics/notice200123/

不管是付費票或里程票,只要飛行時間和開票時間符合退票條件,就可以去電請客服協助辦理

手續如下

  1. 電聯台灣客服  https://www.ana.co.jp/zh/tw/site-help/contact/

    ANA 台湾支店
    02-2521-1989 (付費電話)

受理時間
週一 - 週五:9:00-18:00

文章標籤

咪卡恰比 發表在 痞客邦 留言(0) 人氣()