Annotations - JAR Dependencies

Although I'm a fan of using annotations, I have a problem with the dependencies they create on third-party banks.

For the purposes of this question, I specifically refer to Hibernate or JPA annotations on domain model classes.

In fact, I want my domain model to consist of simple POJOs without any persistence dependency. If I breed my domain classes in one bank, I don’t understand why the application using this bank should import any dependencies related to the annotations used.

Is it possible that annotation banners should only be compile-time dependent?

Thanks,

Andrew

+3
source share
1

, . . ? , .

, API ( , ), :

  • API ( , ) - / / ) . API , .

  • API , XML- . . , . JPA JavaEE; .

+1

Source: https://habr.com/ru/post/1716217/


All Articles