JPA API Hibernate API
--------------- --------------------
EntityManagerFactory SessionFactory
EntityManager Session
EntityTransaction Transaction
Query Query
2022年3月21日 星期一
JPA API和Hibernate API的對照
2022年3月20日 星期日
EclipseLinkJpaVendorAdapter對Oracle資料庫PLSQL支援較佳
開發Spring Data JPA一般會使用HibernateJpaVendorAdapter,但是如果Oracle資料庫會使用EclipseLinkJpaVendorAdapter,對PLSQL支援較佳
ref:
https://www.eclipse.org/eclipselink/documentation/2.5/solutions/oracledb002.htm#CHDDCIEC
2022年3月6日 星期日
NetBeans 13
3月4日Apache基金會正式釋出NetBeans 13
https://blogs.apache.org/netbeans/entry/announce-apache-netbeans-13-released
Apache NetBeans 13 Features
https://netbeans.apache.org/download/nb13/index.html
2022年3月3日 星期四
微服務的容錯處理規範:Microprofile Fault Tolerance
Quarkus有實做Microprofile規範的容錯處理(採用SmallRye)
Spring Cloud以前會使用Netflix Hystrix的方案,但是Hystrix已經停止開發了(只維護)
SpringCloud在2020之後的版本也已經移除spring-cloud-netflix,改推薦使用Resilience4j
Microprofile Fault Tolerance的規格
https://download.eclipse.org/microprofile/microprofile-fault-tolerance-1.1.2/microprofile-fault-tolerance-spec.html
Spring和MicroProfile解決方案比較表
https://www.eclipse.org/community/eclipse_newsletter/2019/september/microprofile.php
2022年3月2日 星期三
Error creating bean with name 'dataConfig': Invocation of init method failed; nested exception is java.awt.HeadlessException
System.setProperty("java.awt.headless", "false");
//DatabaseManagerSwing前面加紅色這一行
DatabaseManagerSwing.main(new String[] { "--url", "jdbc:hsqldb:mem:testdb", "--noexit" });
完整錯誤訊息:
Caused by: java.awt.HeadlessException: null
at java.desktop/java.awt.
at java.desktop/java.awt.Window.<
at java.desktop/java.awt.Frame.<
at java.desktop/java.awt.Frame.<
at java.desktop/javax.swing.
at org.hsqldb.util.
at org.hsqldb.util.
The bean 'localeResolver', defined in class path resource
在組態檔application.properties加入以下設定
spring.main.allow-bean-definition-overriding=true
完整錯誤訊息:
The bean 'localeResolver', defined in class path resource [com/aabbcc/config/WebConfig.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class] and overriding is disabled.