springboot
文章平均质量分 54
东方烈阳
这个作者很懒,什么都没留下…
展开
-
spring boot 集成 postgresql mybatis-plus swagger pagehelper
spring boot 集成 postgresql mybatis-plus swagger pagehelper,进行简单的增删改查。原创 2023-03-30 16:45:35 · 867 阅读 · 1 评论 -
springboot 微信小程序获取用户手机号 最新方式
springboot 小程序获取用户手机号原创 2022-09-20 10:23:36 · 3405 阅读 · 12 评论 -
SpringBoot(51)整合Thymeleaf实现图片上传并显示
SpringBoot(51)整合Thymeleaf实现图片上传并显示直接上代码1.代码结构2.导入Thymeleaf依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>3.index页面<!DOCTY原创 2021-12-01 14:04:26 · 2945 阅读 · 2 评论 -
springboot cache 数据缓存到redis中的value是乱码问题
1.@Cacheable注解会把被标注的方法的返回值缓存到redis中,相同的操作不会查数据库而是从缓存中获取数据。例如:查询id为2的数据,第一次查询从数据库中获取数据,然后这个注解会把得到的结果缓存到redis中,才查id为2的数据就从缓存中获取了。2.这里我遇到了个问题就是缓存到redis中的value是乱码。3.解决在redis配置文件中添加这段代码public CacheManager cacheManager(RedisConnectionFactory factory) {原创 2021-11-12 13:30:57 · 1604 阅读 · 0 评论 -
java爬取网页的数据并存入数据库
这里使用Jsoup来实现改功能。demo用到的技术为springboot+jsoup+mysql+mybatis plus1.首先导入jsoup依赖<dependency> <groupId>org.jsoup</groupId> <artifactId>jsoup</artifactId> <version>1.11.3</version>原创 2021-09-02 16:02:02 · 3863 阅读 · 7 评论 -
springboot 自定义注解 实现把相关日志插入日志表中
springboot aop 实现自定义注解(demo用到了mybatis-plus 对数据进行操作,所以代码中会有相关的注解)注:只实现该功能,相关方法不做解释说明。1.首先在pom文件中添加aop依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId></d原创 2021-08-31 13:52:41 · 705 阅读 · 0 评论