- 博客(4)
- 收藏
- 关注
原创 SQL错误
table doesn't exist或者Unknown column '****' in 'where clause'问题可以将语句中错误部分与数据库中名称改为完全一致,如@Query(value = "UPDATE operate_book SET rent_time = rent_time + 30 WHERE book_id = ? AND userid = ?",nativeQuery = true);...
2022-02-14 15:36:43
243
原创 2021-11-06
@PostMapping("add") public RestResponse add(Goods goods, String type){ GoodsType goodsType = new GoodsType(); goodsType.setType(type); GoodsType obj = goodsTypeService.get(goodsType, null); if(obj != null){ .
2021-11-06 14:10:19
49
原创 登陆页面跳转
Security配置类LoginPage写未登陆时跳转页面路径/user/LogicFail在Controller添加跳转页面路径,return的为页面文件名称在Controller中使用@Controller。不可以使用RestController,否则跳转的不是页面,是return的字符串将前端页面写在static下时loginPage中可以写为@RestController注解相当于@ResponseBody + @Controller合在一起的作用。如果只是使...
2021-11-02 22:28:59
653
原创 登陆页面记录
配置类,loginPage跳转未登陆时的页面,获得页面输入的username和password后调用MyUserDetailsService中使用的findUserByUsername查找的user对象中的user和password比较,相同则登陆成功。loginProcessingUrl登陆请求发送地址,和html中的form(action=“/login”)一致@EnableWebSecuritypublic class SpringSecurityConfig extends WebSec
2021-11-02 22:24:07
88
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人