@Repository註解用法

Spring的註解形式:@Repository、@Service、@Controller,它們分別對應存儲層Bean,業務層Bean,和展示層Bean。 @Repository和@Controller、@Service、@Component的作用差不多,都是把對象交給spring管理。@Repository用在持久層的接口上,這個註解是將接口的一個實現類交給spring管理。 @Repositor
相關文章
相關標籤/搜索