java springboot常用注解

来源:互联网 发布:yy静态头像psd源码 编辑:程序博客网 时间:2024/06/10 19:32
表示事物只读@Transactional(readOnly=true)表示这是个Service@Service("playerService")注入playerService或者调用 dao的impl类@Autowiredapi注释@ApiOperation(value = "login", notes = "登入")表示方法名,请求方式@RequestMapping(value = "/10", method = RequestMethod.POST)表示Spring某个类的是否可以接收HTTP请求@RestController@Controller@ResponseBody的结合体,直接返回return内容,无法返回jsp@RestController表示Spring某个类的是否可以接收HTTP请求@Controller 返回jsp表示为接口实现类@Mapper表示开启事物@EnableTransactionManagement表示为springboot启动main@SpringBootApplication在springboot中用于注册filter和servlet、listener@ServletComponentScan表示这是 ServletContextListener监听事件@WebListener
原创粉丝点击