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

  • 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.

主站蜘蛛池模板: 姜堰市| 台安县| 富裕县| 大竹县| 克东县| 乌审旗| 扎兰屯市| 饶阳县| 明水县| 宜兴市| 包头市| 高雄市| 德保县| 芜湖市| 博湖县| 衡东县| 新建县| 海伦市| 商丘市| 武强县| 巢湖市| 德令哈市| 邻水| 靖安县| 通江县| 宝山区| 武胜县| 吴堡县| 门头沟区| 马鞍山市| 通渭县| 维西| 兴城市| 新野县| 阜阳市| 五常市| 微山县| 涟源市| 运城市| 南开区| 民乐县|