摘要:
背景: 在一般情况下,我们是使用toString()方法打印信息,但是这种方法并不通用,因此,我们需要一种简单,通用的方法,这里就用到了Gson <!-- gson 开始 --> <dependency> <groupId>com.google.code.gson</groupId> <artifa 阅读全文
posted @ 2022-05-05 18:23
jamstack
阅读(229)
评论(0)
推荐(0)
摘要:
在pom.xml里添加如下依赖: <!-- flyway 开始 --> <dependency> <groupId>org.flywaydb</groupId> <artifactId>flyway-core</artifactId> </dependency> <!-- flyway 结束 --> 阅读全文
posted @ 2022-05-05 17:14
jamstack
阅读(190)
评论(0)
推荐(0)
摘要:
也可以使用session自带的id,这里演示的是使用自定义uuid为session生成的id @RequestMapping(value = "/uuid", method = RequestMethod.GET) public @ResponseBody String uid(HttpSessio 阅读全文
posted @ 2022-05-05 06:59
jamstack
阅读(1159)
评论(0)
推荐(0)
摘要:
背景: 如果不把session存储到redis里,而是采用传统的方式,在前后端分离的项目中,会出现获取不到session的情况 String verificationCodeIn = (String) httpServletRequest.getSession().getAttribute(veri 阅读全文
posted @ 2022-05-05 05:12
jamstack
阅读(270)
评论(0)
推荐(0)