AdSense

網頁

2020/12/30

Spring Boot JdbcTemplate 印出SQL及參數 print query sql and params

在Spring Boot使用JdbcTemplate在console印出執行的SQL及條件參數的方法如下。

Spring Boot H2 Database JdbcTemplate datasource jdbc url

在Spring Boot H2資料庫的datasource jdbc url設定如下。

Canary Deployment 金絲雀部署

Canary Deployment(金絲雀部屬)是一種軟體部署發布策略/模式(deployment/release strategy/pattern)。

2020/12/27

TortoiseSVN 建立並切換分支 create and switch branch

TortoiseSVN建立新分支並切換到新分支的方式如下。

幹!台鐵又誤點了! 20201228

早上要搭2114車次08:03分桃園的區間車到台北誤點8分。

Docker 檢視容器的volume inspect container volumes

Docker 檢視容器的volume的方法如下。

Docker 顯示所有的volumes show all volumes

Docker 顯示所有的volumes的方法如下。

Docker 移除未使用的volumes remove unused volumes

Docker 移除未使用的volumes方法如下。

2020/12/26

2020年底回顧

2020年,充滿變數的一年即將邁入尾聲,依慣例回顧今年及展望明年。

2020/12/25

Spring Boot Web @ResponseBody 作用

Spring Boot Web (Spring MVC)的@ResponseBody作用如下。

Spring Boot Web @RestControllerAdvice與@ControllerAdvice區別

Spring Boot Web專案統一處理Controller拋出的例外錯誤可用@ControllerAdvice@RestControllerAdvice,兩者區別如下。

2020/12/24

Java 判斷潤年 leap year

Java判斷該年是否為潤年(leap year)的方式。

Quartz 排程表示式格式 cron expressions format

Quartz cron expressions(cron 表示式)格式如下。

2020/12/23

IntelliJ IDEA 調整縮排設定 indent format setting

IntelliJ IDEA 調整縮排設定的方式如下。

麥當勞 蕈菇豬肉滿福堡加蛋 SAUSAGE McMUFFIN WITH EGG AND MUSHROOM

最近麥當勞早餐在推加了蕈菇(蘑菇)的滿福堡。

2020/12/22

2020/12/21

上班爬樓梯進辦公室的理由

上班的辦公地點在6樓,有電梯也有樓梯可以上去。

Spring Data JPA Repository INSERT INTO SELECT WHERE NOT EXISTS

在Spring Data JPA的Repository使用INSERT INTO .. SELECT .. WHERE NOT EXISTS避免資料重覆新增。

2020/12/19

Docker run Spring Boot + MySQL containers

本範例在本機分別啟動Spring Boot container與MySQL container並建立連結。

2020/12/18

Spring Data JPA Query Methods WHERE IS NULL條件查詢

Spring Data JPA 可用方法名稱查詢(query mehtods)撈取資料,查詢條件為WHERE <column> IS NULL的方法寫法如下。

日誌 20201218 女兒一月大

女兒出生快兩個月。

2020/12/17

資料庫 schema 到底是什麼意思 database schema meaning

在寫程式頭兩年一直聽不懂同事口中的schema到底是什麼意思。

2020/12/16

Spring JdbcTemplate query BeanPropertyRowMapper return List elements are null

今天同事和我分享關於BeanPropertyRowMapper回傳List<String>長度大於零但內容為空的現象。

Windows 安裝Apache JMeter™

在Windows安裝壓力測試工具Apache JMeter™

2020/12/15

IntelliJ IDEA Community 建立Spring Boot JSP專案

在IntelliJ IDEA Community(社群版)建立Spring Boot JSP專案。

Java 移除List中重複的元素 remove duplicates from List

Java把List中重複的元素移除的方法如下。

2020/12/13

MySQL and MariaDB in real life

MySQL與MariaDB真人版。

Spring Boot Jib Maven build image to Docker Hub

使用GoogleContainerTools下的Jib maven plugin build Spring Boot docker image並推送到Docker Hub registry。

2020/12/12

Docker 映像檔與分層 images and layers

本篇翻譯自Docker官方文件的「About storage drivers - Images and layers」。

Docker 推送image到Docker Hub push build image to docker hub

Docker image push到Docker Hub的方法如下。

String Boot Jib Maven build docker image

使用GoogleContainerTools下的Jib maven plugin build Spring Boot docker image。

2020/12/10

資料庫 SQL交易隔離 不重覆讀 SQL transaction isolation non-repeatable read

ANSI SQL-92的4.28 SQL-transactions中提到的併發交易(concurrent transaction)隔離的不重覆讀(non-repeatable read)現象。

台北市 內湖區 洲子美食街 野人舒食

昨天開始打算之後午餐都吃野人舒食的雞胸肉沙拉看能不能幫助減重。

2020/12/8

Python len() 取得物件長度

Python 的len(s)函式可取得物件的長度。

2020/12/7

Spring Data JPA 樂觀鎖 optimistic locking

Spring Data JPA 樂觀鎖(Optimistic locking)範例如下。

Python List 基本用法範例

Python的List的基本用法如下。

2020/12/6

MySQL 8 InnoDB SELECT FOR SHARE 與 SELECT FOR UPDATE 差異

MySQL 8 InnoDB 鎖定讀(Locking Reads)分為SELECT ... FOR SHARESELECT ... FOR UPDATE,兩者差異如下。

ANSI SQL-92 SQL-transaction isolation level

資料庫交易的ACID特性中的隔離性(Isolation)定義當一筆資料同時被多個交易存取時產生的影響程度。ANSI SQL-92文件中定義了四種隔離層級(isolation level):

Python 浮點數四捨五入,無條件進位,無條件捨去 floats round up and round down

Python 對浮點數做四捨五入,無條件進位,無條件捨去的方式如下。

Python 整數與字串轉換 convert int and string

Python整數與字串的轉換方式如下。

Python 使用abs()取得絕對值

Python的abs(x)函式可以把數值轉為絕對值。

2020/12/5

Python 使用input()取得使用者輸入

Python在程式中要取得使用者輸入,可使用input([prompt])函式。

Python 在IntelliJ IDEA 撰寫hello world

在IntelliJ IDEA 撰寫Python程式印出hello world。

2020/12/4

Python 什麼是IDLE

Python的IDLE(Integrated Development and Learning Environment)為整合開發與學習環境,簡單說就是撰寫Python程式的工具。

2020/12/3

2020 如何知道心儀女生的電話

在2020年(也許到2021年也適用)如果你暗戀一個女生,又想知道她的電話號碼,你可以...

Docker Docker Compose與Dockerfile差別

Docker的Docker Compose與Dockerfile的差別如下。

Docker 什麼是Docker Compose

Docker Compose簡介。

2020/12/1

Docker Jenkins Maven building Spring Boot from Github

使用Jenkins docker container的pipeline建置Github上的Spring Boot專案。

Mac Finder 顯示隱藏檔案快速鍵 show hidden files shortcut

Mac的Finder中顯示隱藏檔案的快速鍵為shift ⇧ + command ⌘ + .

Mac install Maven by Homebrew

Mac使用Homebrew安裝Maven的方式如下。

日誌 20201201 日 女兒滿月

女兒出生滿一個月了,身長51公分,體重3,900克。

AdSense