Spring, and Hibernate uses reflection to create a bean (in the case of spring) and a POJO mapping (in the case of Hibernate). Does it adversely affect performance? Because reflection is slower compared to direct object creation.
Although there is a penalty for performance, it is relatively low and can be considered negligible. The key problem is that the advantage you get from using ORM (with reflection) is far superior to the very small performance rewards you pay.
, , , , , , .
, . Hibernate , , , , , .
, .
, - , "". Hibernate, , , , - Hibernate. Spring bean .
, , .
Hibernate Q & FAQ,
, "" - CGLIB. , "" get/set calls API Java . () .
, . ( :)
; , / JDBC.
spring , .
UPDATE: , , , , . , , , .
You can only find out if you are measuring your specific workload.
Suppose Spring + Hibernate adds an overhead of 3 milliseconds to extract + moisturize 100 objects.
If your unit of work usually takes 120 milliseconds, then there is very little overhead. If it takes 5 milliseconds, then it is serious.