SpringBoot学习笔记
txhljjb
这个作者很懒,什么都没留下…
展开
-
springboot自动(@Autowired)注入方式出错:Could not autowire. No beans of 'UserDao' type found.
@Mapper public interface UserDao { /** * 通过名字查询用户信息 */ @Select("SELECT * FROM user WHERE name = #{name}") User findUserByName(@Param("name") String name); }@Service public class UserService ...原创 2019-02-23 22:04:40 · 6710 阅读 · 0 评论 -
SpringBoot 中@GetMapping和@PostMapping测试同一方法,为什么用@Get类型的注解可以访问成功,而@PostMapping用浏览器访问失败
@GetMapping是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。该注解将HTTP Get 映射到 特定的处理方法上。 Difference between @GetMapping & @RequestMapping:@GetMapping does not support the consumes attri...原创 2019-02-20 10:20:16 · 12318 阅读 · 1 评论