2019年9月14日 星期六

Regular Expression 處理 SQL INSERT 指令格式問題

Oracle

INSERT INTO JHI_USER(ID, LOGIN, PASSWD, FIRST_NAME, LAST_NAME, EMAIL, ACTIVATED, LANG_KEY, ACTIVATION_KEY, RESET_KEY, PASSWORDPERIOD, PASSWORDCHANGEDDATE, FORCETOCHANGEPASSWORD, CREATED_BY, CREATED_DATE, RESET_DATE, LAST_MODIFIED_BY, LAST_MODIFIED_DATE)
  VALUES(32, '85757', '$2auuuuuuuuuuu', '林XX', '林XX', NULL, 1, 'zh-tw', NULL, 'true', NULL, NULL, 0, 'system', TO_TIMESTAMP('2017-06-22 09:11:04:9000000','YYYY-MM-DD HH24:MI:SS:FF'), NULL, 'system', TO_TIMESTAMP('2017-08-31 09:06:58:612000000','YYYY-MM-DD HH24:MI:SS:FF'))
GO


Mysql

INSERT INTO JHI_USER(ID, LOGIN, PASSWD, FIRST_NAME, LAST_NAME, EMAIL, ACTIVATED, LANG_KEY, ACTIVATION_KEY, RESET_KEY, PASSWORDPERIOD, PASSWORDCHANGEDDATE, FORCETOCHANGEPASSWORD, CREATED_BY, CREATED_DATE, RESET_DATE, LAST_MODIFIED_BY, LAST_MODIFIED_DATE)
  VALUES(32, '85757', '$2auuuuuuuuuuu', '林XX', '林XX', NULL, 1, 'zh-tw', NULL, 'true', NULL, NULL, 0, 'system', STR_TO_DATE('2017-06-22 09:11:04:612000','%Y-%m-%d %H:%i:%s:%f'), NULL, 'system', STR_TO_DATE('2017-08-31 09:06:58:612000','%Y-%m-%d %H:%i:%s:%f'));


利用Notepad++  Regular Expression gular Expression 取代功能




Find what:        :[0-9]+','YYYY-MM-DD HH24:MI:SS:FF'\)

Replace with:    :612000','%Y-%m-%d %H:%i:%s:%f'\)

同時另外將   TO_TIMESTAMP 取代為 STR_TO_DATE

2018年4月10日 星期二

Overview of the java.util.concurrent

http://www.baeldung.com/java-util-concurrent

2018年1月3日 星期三

The best way to do batch processing with JPA and Hibernate

https://vladmihalcea.com/the-best-way-to-do-batch-processing-with-jpa-and-hibernate/

https://stackoverflow.com/questions/2773302/jpa-hibernate-bulkbatch-insert

2017年12月28日 星期四

Mysql clustering

https://shazi.info/%E6%9E%B6%E8%A8%AD-ha-%E9%AB%98%E5%8F%AF%E7%94%A8%E6%80%A7%EF%BC%9Amysql-cluster-%E5%8F%A2%E9%9B%86-7-4-115-6-29/

http://stackoverflow.max-everyday.com/2017/10/mysql-for-commercial/

http://www.clusterdb.com/mysql-cluster/using-clusterjpa-part-of-mysql-cluster-connector-for-java-a-tutorial

2017年12月21日 星期四

Easily secure your Spring Boot applications with Keycloak

https://developers.redhat.com/blog/2017/05/25/easily-secure-your-spring-boot-applications-with-keycloak/

2017年12月16日 星期六

How to use JPA correctly to avoid complaints of a slow application


https://zeroturnaround.com/rebellabs/how-to-use-jpa-correctly-to-avoid-complaints-of-a-slow-application/

2017年11月4日 星期六

Modified Java Script Value & Dynamic SQL

https://stackoverflow.com/questions/36918706/pentaho-insert-a-list-in-sql-where-clause