Wesley13 Wesley13
4年前
java中比较两个时间的差值
项目背景1.某篇文稿的发布时间是publishDate,例如:2020072118:00:41。2.现要求判断该篇文稿的发布时间是否在近30天之内。publicstaticlongdayDiff(DatecurrentDate,DatepublishDate){LongcurrentTimecurrentDat
Wesley13 Wesley13
4年前
@Transactional 不生效总结
坑1:@Transactional不生效?解决思路如下:1\.是否添加依赖新项目经常会忘记添加各种依赖导致(Transactional依赖AOP实现,因此需要导入aop相关依赖)compile'org.springframework.boot:springbootst
Stella981 Stella981
4年前
SpringBoot启动报错Failed to determine a suitable driver class
从SpringBootInitializer(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fstart.spring.io%2F) 新建SpringBoot项目添加一个简单控制器,启动报错如下:._________
Easter79 Easter79
4年前
SpringBoot自定义序列化的使用方式
场景及需求:项目接入了SpringBoot开发,现在需求是服务端接口返回的字段如果为空,那么自动转为空字符串。例如:\    {        "id":1,        "name":null    },    {        "id":2,        "name":"x
Stella981 Stella981
4年前
Spring Security 案例实现和执行流程剖析
SpringSecuritySpringSecurity是Spring社区的一个顶级项目,也是SpringBoot官方推荐使用的安全框架。除了常规的认证(Authentication)和授权(Authorization)之外,SpringSecurity还提供了诸如ACLs,LDAP,JAAS,CAS等高
Stella981 Stella981
4年前
Spring Boot demo系列(十):Redis缓存
1概述本文演示了如何在SpringBoot中将Redis作为缓存使用,具体的内容包括:环境搭建项目搭建测试2环境RedisMySQLMyBatisPlus3Redis安装Redis安装非常简单,以笔
Stella981 Stella981
4年前
GuozhongCrawler看准网爬虫动态切换IP漫爬虫
有些关于URL去重的方面代码没有提供,需要自己去实现。主要这里提供思路项目地址:http://git.oschina.net/woshidaniu/GuozhongCrawler/tree/master/example/changeProxyIp/首先爬虫入口类:publicclassPervadeSpider{  
Easter79 Easter79
4年前
SpringBoot启动报错Failed to determine a suitable driver class
从SpringBootInitializer(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fstart.spring.io%2F) 新建SpringBoot项目添加一个简单控制器,启动报错如下:._________
Stella981 Stella981
4年前
Spring Boot实现热部署
在SpringBoot实现代码热部署是一件很简单的事情,代码的修改可以自动部署并重新热启动项目。引用devtools依赖<dependency<groupIdorg.springframework.boot</groupId<artifactIdspringbootd
Wesley13 Wesley13
4年前
K8s命令行工具推荐
Kubectx& Kubens项目地址:https://github.com/ahmetb/kubectx(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fgithub.com%2Fahmetb%2Fkubectx)安装:brewinstallkub