自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 绝对路径和相对路径

温故而知新,可以为师也文件A的位置 D:\abc\path1\file1文件B的位置 D:\abc\path2\file2文件C曰:文件A告诉我文件B的位置文件A日:你说的是相对路径还是绝对路径?文件C日:相对文件A日: 咦!那不就是D:/abc/path2/file2文件C日:绝对呢?文件A日:../path2/file2文件C日:中! “..”是啥意思?文件A日:退一步,海阔天空。在java中路径一般用“/”表示 也可以用“\\” 反正我不会有意见在windows中用

2021-12-09 16:09:17 374

原创 Spring Boot 整合JetCache缓存框架实现本地caffeine远程redis存储

Spring Boot 整合JetCache缓存框架实现本地caffeine远程redis存储JetCache主要通过@Cached和@CreateCache实现缓存,@Cached是在接口方法或者类方法上添加缓存,一般以参数为key,以返回值为value存入缓存中。@CreateCache是直接创建一个缓存实例,然后调用put(Tkey, T value)、get(T key)等方法实现缓存。 <dependency> <groupId>org

2021-11-25 18:03:02 1829

原创 bootstrap.yml不生效

spring-cloud 2020微服务下的 bootstrap.yml不生效 <!--nacos配置管理依赖--> <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> &l

2021-11-24 23:08:50 247

原创 Consider defining a bean of type ‘com.alicp.jetcache.anno.support.ConfigMap‘ in your configuration

Consider defining a bean of type ‘com.alicp.jetcache.anno.support.ConfigMap’ in your configuration解决办法 启动类上加注解@EnableMethodCache(basePackages = "com.sasa.demo")//项目主路径@EnableCreateCacheAnnotation

2021-11-24 09:24:54 3578

原创 List 如何一边遍历,一边删除?java.util.ConcurrentModificationException: null

List 如何一边遍历,一边删除?不能使用foreachpublic static void main(String[] args) { List<String> platformList = new ArrayList<>(); platformList.add("老司机"); platformList.add("优快云"); platformList.add("带带我"); for (String platform : platfo

2021-11-23 23:14:03 105

原创 spring cloud整合feign和nacos报错:No Feign Client for loadBalancing defined. Did you forget to include

spring cloud整合feign和nacos报错:No Feign Client for loadBalancing defined. Did you forget to include由于SpringCloud Feign在Hoxton.M2RELEASED版本之后不再使用Ribbon而是使用spring-cloud-loadbalancer,所以不引入spring-cloud-loadbalancer会报错解决方法 加入spring-cloud-loadbalancer依赖并...

2021-11-23 22:55:18 394

原创 Map Iterator循环

Map循环Map<String,Object> map=new HashMap<>();map.put(“a”,1);map.put(“b”,2);Iterator<Map.Entry<String,Object>> it=map.entrySet().iterator();while (it.hasNext()){Map.Entry<String,Object> entry=it.next();System.out.println(

2021-06-16 16:10:04 294

原创 java时间格式转换

**SimpleDateFormat sdf=new SimpleDateFormat("YYYY-mm-dd HH:mm:ss"); SimpleDateFormat sdf1=new SimpleDateFormat("YYYY年mm月dd日 HH时mm分ss秒"); String newdate=sdf.format(date); String newdate1=sdf1.format(date); System.out.println(newdate); System.out.print.

2021-06-15 18:18:31 1173 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除