网站首页
编程语言
数据库
系统相关
其他分享
编程问答
organizationId
2024-06-02
SpringBoot常用注解
1、bean相关注解注解名作用@Component将类交给SpringBoot管理@Repository放在dao层@Service放在service层,即业务服务层@Controller放在控制层,即handler层@RestController@Response和@Controller的组合注解,返回的是JSON数据@Configuration声明一个类为配置类,常和Bean、Scope