spring常用註解

爲了方便以後開發中查閱和複習,整理了以下的一些常用註解 將 bean 添加到 spring 的管理 @Component(「bean的id」) @Service(「bean的id」) @Repository("bean"的id) @Named(「bean的id」)【@Component的替代方案】 定義配置類 @Configuration @Bean 告訴 Spring 被修飾的方法會返回一個對象
相關文章
相關標籤/搜索