Spring详细内容-Spring ORM Frameworks En(6)

阳光穿透心脏的1/2处 2023-09-24 19:24 115阅读 0赞

1.Spring ORM Frameworks

  • Spring provides API to easily integrate Spring with ORM frameworks such as Hibernate,PA(Java Persistence API), JDO(Java Data Objects), Oracle Toplink and iBATIS

Advantage of ORM Frameworks with Spring

  • Less coding is required: By the help of Spring framework, you don’t need to write extra codes before and after the actual database logic such as getting the connection, starting transaction, commiting transaction, closing connection etc.
  • Easy to test: Spring’s IoC approach makes it easy to test the application.
  • Better exception handling: Spring framework provides its own API for exception handling with ORM framework.
  • Integrated transaction management: By the help of Spring framework, we can wrap our mapping code with an explicit template wrapper class or AOP style method interceptor.

2. Spring Expression Language (SPEL)

  • SpEL is an exression language supporting the features of querying and manipulating an object graph at runtime.
  • SpEL API
    The SpEL API provides many interfaces and classes.
    Expression interface
    SpelExpression class
    ExpressionParser interface
    SpelExpressionParser class
    EvaluationContext interface
    StandardEvaluationContext class

发表评论

表情:
评论列表 (有 0 条评论,115人围观)

还没有评论,来说两句吧...

相关阅读

    相关 SpringORM

    ORM: 对象关系映射(Object Relational Mapping,简称ORM)模式是一种为了解决面向对象与关系数据库存在的互不匹配的现象的技术。简单的说,ORM是通过