java
Matea1024
致力于构造高效IT组织的理论与实践,大规模团队敏捷实践和管理再造,以及企业级技术应用趋势和技术战略的研究等
展开
-
Either health or status endpoint must be enabled,
【代码】Either health or status endpoint must be enabled,原创 2022-09-28 00:03:52 · 1774 阅读 · 0 评论 -
解决nexus中报错“cannot open local storage ‘/nexus-data/db/config‘ with mode=rw“的问题
前言由于服务器磁盘空间占满,导致nexus自带的OrientDB数据库读写文件错误,影响了nexus进程解决方法这里采用docker-compose方式部署nexus服务docker-compose方式部署nexus服务进入db文件目录下的config目录,删除以.wal结尾的文件cd /mnt/nexus/nexus-data/db/configrm -rf *.wal重启nexus重启docker restart nexus-server结语参考nexus3 磁盘空间满后原创 2022-02-25 17:49:19 · 2160 阅读 · 3 评论 -
java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.get
问题:java.lang.NoSuchMethodError: org.springframework.boot.autoconfigure.web.ServerProperties$Servlet.getServletPrefix()Ljava/lang/String;版本不高了导致,可以试用epf-cloud 2.0.0 Finchley.RELEASE 版本原创 2021-11-22 21:52:26 · 1748 阅读 · 0 评论 -
springboot-防止sql注入,xss攻击,cros恶意访问
XssAndSqlConfig.javapackage com.epf.filter;import com.google.common.collect.Maps;import org.springframework.boot.web.servlet.FilterRegistrationBean;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Confi原创 2021-03-26 16:32:42 · 279 阅读 · 1 评论 -
@deprecated使用
主要是对过时的类进行说明,后期发布版本好删除掉1.类上使用/** * @author Matea * 用户epf-admin 集群方式 * @deprecated 该类后期版本会删除掉 建议使用:IUserFegin */@FeignClient(value = "epf-admin",url = "${fegin.server.ip-address:}")public inte...原创 2020-04-21 09:54:59 · 248 阅读 · 0 评论 -
001.IntelliJ IDEA快捷键
一.编辑快捷键SDK设置Ctrl + Shift + Alt + S surround templates 包含生成Ctrl+Alt+T实时代码模板主要是通过两个快捷键:Tab 和 Ctrl + J。快速复制光标在直接Ctrl+C复制历史(只包含5个)Ctrl+Shift+V代码格式化Ctrl+Alt+L快速剪切光标在直接Ctrl+X快速拷贝复制C...原创 2019-12-28 17:22:47 · 191 阅读 · 0 评论 -
JSON string to Map
JSON string to Mappackage com.mkyong;import com.fasterxml.jackson.databind.ObjectMapper;import java.io.IOException;import java.util.Map;public class JacksonMapExample1 { public static voi...原创 2019-12-13 15:54:09 · 535 阅读 · 0 评论 -
异常处理org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe
异常处理org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipeorg.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe at org.apache.catalina.co...原创 2019-07-24 20:50:57 · 2567 阅读 · 0 评论 -
002 mybatis in查询
一、添加publishNosList<String> publishNos=new ArrayList<>();for(Map<String,String> act:acts){ publishNos.add(act.get("businessId"));}param.put("publishNos", publishNos);List<TS...原创 2019-05-23 11:19:07 · 122 阅读 · 0 评论 -
零头小记-对象转json/对象拷贝
一、对象转jsonimport static com.alibaba.fastjson.JSON.toJSONString;System.out.println(toJSONString(act));原创 2019-05-17 17:01:24 · 185 阅读 · 0 评论 -
Java正确URL解码方式:URLDecoder.decode IllegalArgumentException: URLDecoder
一、报错java.lang.IllegalArgumentException: URLDecoder: Illegal hex characters in escape (%) pattern - For input string: ";""Java调用 URLDecoder.decode(str, “UTF-8”); 抛出以上的异常,其主要原因是% 在URL中是特殊字符,需要特殊转义一下...原创 2019-04-24 23:27:14 · 1146 阅读 · 0 评论 -
003 Lambda递归查询所有菜单树
Lambda递归查询所有菜单树/** * 查询所有菜单树 * JDK1.8 */private List<MenuEntity> getMenuTreeList(List<MenuEntity> menuList,String pid) { // 查找所有菜单 List<MenuEntity> childrenList = new Ar...原创 2019-04-14 22:29:35 · 1148 阅读 · 1 评论 -
001 AOP切面使用注解翻译字典值
参考文献:https://my.oschina.net/angelbo/blog/2875887感谢博主提供的解决思路方法博主缺点:不能对字符串字典进行处理,已优化需求在服务端开发,数据库表中有些字段对应的是字典值,在查询的时候要展示字典值,这个时候可能就需要关联字典表查询,或者在前后端开发过程中,由前端页面展示的部分调取字典服务的接口来展示,但这样都有问题,前者是数据库字典变更...原创 2019-03-26 21:32:18 · 3641 阅读 · 2 评论 -
通过配置后反射执行指定方法
public Object executionMethod(String className, String methodName, Object... args){ try { Class&lt;?&gt; clazz = wac.getBean(className).getClass(); Class[] ...原创 2019-01-23 16:51:31 · 285 阅读 · 0 评论 -
JsonProperty的使用,forEach+Lambda 表达式遍历Map和List
1.JsonProperty的使用public class ProductVO { @JsonProperty("name") private String categoryName;}如果前端需要返回name,而后端避免有歧义,不想叫name可以使用JsonProperty来转换2.Java8新特性之forEach+Lambda 表达式遍历Map和List一...原创 2018-11-26 18:48:07 · 1121 阅读 · 0 评论 -
使用Groovy自定义解析表达式
一、引入Groovy依赖&amp;lt;dependency&amp;gt; &amp;lt;groupId&amp;gt;org.codehaus.groovy&amp;lt;/groupId&amp;gt; &amp;lt;artifactId&amp;gt;groovy-all&amp;lt;/artifactId&am原创 2018-08-28 20:57:12 · 2934 阅读 · 0 评论 -
java中Json数组转实体类
import com.alibaba.fastjson.JSONArray;List<TaskNodeEntity> taskNodes = JSONArray.parseArray(jsonStr,TaskNodeEntity.class);原创 2018-08-23 18:34:06 · 10058 阅读 · 3 评论 -
Java日期增加
Java日期增加Date date = new Date(); //需要加的时间Calendar ca = Calendar.getInstance();ca.setTime(date);//设置到Calendar里ca.add(Calendar.DATE, 4);// 增加4天,可以改变的date = ca.getTime(); //获取增加后的值...原创 2018-08-16 22:36:37 · 724 阅读 · 0 评论