Java
k10509806
这个作者很懒,什么都没留下…
展开
-
Springboot Cache比较好的实践
当缓存需要返回全部的时候 @Cacheable(key = "'all'") publicList<SysParam> queryAllSysParamList() { returnsysParamDao.querySysParamList(); } @CacheEvict(allEntries = true) publicInteger createSysParam(SysParamDTO dto) {} @CacheEvict(allEntries = true)...原创 2021-08-27 11:54:22 · 179 阅读 · 0 评论 -
SpringBoot Caffeine多缓存配置
@Configuration public class CaffeineCacheConfiguration { @Bean @ConfigurationProperties(prefix = "caffeine") public Map<String, String> cacheSpecs() { return new HashMap<...原创 2020-03-29 09:24:04 · 1747 阅读 · 0 评论 -
异常码设计
定义异常码接口 public interface ErrorCode { String getErrorCode(); } 定义数据库异常码 public enum DatabaseErrorCode implements ErrorCode { DB_AUTH_FAILED("10000000"), ; private final String原创 2013-06-23 21:00:04 · 1866 阅读 · 0 评论 -
Java基本,字符串处理
/* * 文件名:TestConvert.java * 版权:Copyright 2012-2014 Li Huaxin Tech. Co. Ltd. All Rights Reserved. * 描述: TestConvert.java * 修改人:lihuaxin * 修改时间:2014年4月25日 * 修改内容:新增 */ package com.huaxin.test.sp原创 2014-04-25 22:37:08 · 765 阅读 · 0 评论