about 6 years ago
SpringBoot 有整合liquibase 的自動配置,使用上很方便,但是也有些使用上考量的地方,我最後還是沒有放在 SpringBoot 裡面使用,但是先記錄下來也許哪天會用。
Read on → about 6 years ago
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(fos, "UTF-8"));
FileLock lock = fis.getChannel().lock();
BufferedReader br = new BufferedReader(new InputStreamReader(fis, "UTF-8"));
String str;
while ((str = br.readLine()) != null) {
//... code for manipulation of str
bw.write(str);
bw.newLine();
}
lock.release();
about 6 years ago
circleci 上的 gradle 是蠻舊的版本了,新版的 Springboot plugin 不太支援這麼舊版所以導致打包都一直失敗。
在 circle.yml 自己更新 gradle 版本
Read on → about 6 years ago
寫程式免不了有些組態設定之類的,尤其當你這程式是一個公用類別的時候,還必須教大家怎麼設定變數直,出份文件之類的
現在可以透過 org.springframework.boot:spring-boot-configuration-processor 來自動產生參數的描述檔,當大家需要變動參數時,就可以自動提示知道有那些參數跟說明,省事非常多,最重要的是不會有所謂版本對不起來。
Read on → about 6 years ago