Can @Component, @Repository and @Service annotations be used interchangeably in Spring or do they provide any particular functionality besides acting as a notation device?>
Use of @Service
and @Repository
annotations are important from database connection perspective.
@Service
for all your web service type of DB connections@Repository
for all your stored proc DB connectionsIf you do not use the proper annotations, you may face commit exceptions overridden by rollback transactions. You will see exceptions during stress load test that is related to roll back JDBC transactions.