官术网_书友最值得收藏!

  • Java EE 8 and Angular
  • Prashant Padmanabhan
  • 199字
  • 2021-07-02 19:22:36

Summary

As you may have noticed, getting started with JPA and CDI isn't that complex. With an understanding of both, it's possible to build large applications which utilize these technologies for various business cases. We looked at how dependency injection promotes writing loosely coupled and testable code and how CDI, a ubiquitous API for dependency injection and context management in Java EE, helps us do that.

CDI 2 brings ordered and asynchronous events to further enrich this programming model. As of the 2.0 release, CDI is available for Java SE as well. JPA has been updated for utilizing Java 8 Streams, repeatable annotations, and date/time APIs along with better CDI integration support. The JPA entities are defined as classes using @Entity, @MappedSuperclass, and @Embeddable annotations. To track state changes, we get to use entity listeners that can be used with CDI as well. Bean Validation 2.0 can be leveraged when defining constraints on JPA entities; this declarative method makes adding validations a fairly easy task to do.

Having learnt about CDI and JPA, which are two fundamental APIs that are used for building Java EE solutions; we can now switch our focus to microservices as we explore API-driven architecture.

主站蜘蛛池模板: 富阳市| 楚雄市| 恩平市| 宁海县| 乌兰浩特市| 马龙县| 马公市| 琼结县| 金堂县| 高邮市| 界首市| 云林县| 比如县| 湖南省| 康平县| 陈巴尔虎旗| 红桥区| 错那县| 永年县| 开平市| 久治县| 宝丰县| 读书| 澎湖县| 西城区| 苍山县| 大关县| 阜平县| 垦利县| 阜新市| 阿拉善盟| 蕉岭县| 浪卡子县| 江北区| 江达县| 得荣县| 个旧市| 博乐市| 河曲县| 广宁县| 临猗县|