@Repository: Difference between revisions
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
=Overview= | =Overview= | ||
@Repository is a [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Stereotype|stereotype annotation]] for the persistence layer that lets [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Component_Scanning|component scanning]] find and configure the [[Spring_Persistence_Concepts#DAO|DAOs]] and [[Spring_Persistence_Concepts#Repository|repositories]] without having to provide XML configuration entries for them. | @Repository is a [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Stereotype|stereotype annotation]] for the persistence layer that lets [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Component_Scanning|component scanning]] find and configure the [[Spring_Persistence_Concepts#DAO|DAOs]] and [[Spring_Persistence_Concepts#Repository|repositories]] without having to provide XML configuration entries for them. The annotation indicates that the class should be automatically discovered by component scanning and instantiated as a bean in the Spring application context. |
Revision as of 21:23, 14 October 2018
Internal
Overview
@Repository is a stereotype annotation for the persistence layer that lets component scanning find and configure the DAOs and repositories without having to provide XML configuration entries for them. The annotation indicates that the class should be automatically discovered by component scanning and instantiated as a bean in the Spring application context.