- 博客(9)
- 收藏
- 关注
原创 单例设计模式
单例设计模式的目的就是保证某个类仅有一个实例,当某些类创建对象内存开销较大时可以考虑使用该模式;单例模式又可以分为饿汉式和懒汉式1、饿汉式:该模式在类加载时就会实例化一个对象。具体代码如下:public class Person{ //饿汉式单列 private static Person person=new Person(); private Person(){} public...
2019-12-30 17:03:16 173 2
原创 keytool不是内部或外部命令
添加…\jre\bin到环境变量中右键“我的电脑”,单击“属性”,打开“高级系统设置”,点击“环境变量”;在用户变量中寻找“PATH”,或者新建一个“PATH”,大小写不敏感,变量值设为对应的jre\bin目录。生成密钥证书下边命令生成密钥证书,采用RSA 算法每个证书包含公钥和私钥keytool -genkeypair -alias xckey -keyalg RSA -keypass ...
2019-12-25 16:10:04 501
原创 upstream timed out, host: "cms_server_pool";
检查nginx.conf文件,发现是未添加upstream服务只需添加#静态资源服务upstream static_server_pool {server 127.0.0.1:91 weight=10;}
2019-12-23 11:49:24 135
原创 nginx报错:maximum number of descriptors supported by select() is 1024 while connecting to upstream
那是因为nginx windows版本 1024限制Windows版本因为文件访问句柄数被限制为1024了,当访问量大时就会无法响应。会有如下错误提示:maximum number of descriptors supported by select() is 1024修改参数worker_connections可以解决此限制,还有其它很多说修改worker_rlimit_nofile 参...
2019-12-22 21:54:50 2222
原创 Caused by: freemarker.core.InvalidReferenceException: The following has evaluated to null or miss
该报错主要原因是:ftl文件里有部分值可能为空,因此设置个默认值即可。具体遇到有以下两种情况报错代码:<script>var courseId = "${courseBase.id}"</script>修改后代码:<script>var courseId = "${(courseBase.id)!""}"</script>报错代码:...
2019-12-21 10:17:13 1320
原创 解决Nginx无法正常启动的问题
改Nginx的bug改一天,一部分报错信息被我删除了,因为太多了,现在贴一部分这个报错内容,前一部分是因为空格问题,明明多余空格被我删除了,且还老是报错,后面直接粘贴下面的一些注释部分,然后对注释内容一步步修改,就改好了后面的host not found in upstream “cms_server_pool” in D:\Program Files (x86)\nginx-1.14.0/...
2019-12-20 21:04:27 1698
原创 Feign测试出现过程中的bug
feign.codec.DecodeException: Could not extract response: no suitable HttpMessageConverter found for response type [class com.xuecheng.framework.domain.cms.CmsPage] and content type [text/plain] at f...
2019-12-19 20:43:51 728 1
原创 国内maven仓库地址找不到某个jar的解决方法
找到settings.xml的配置文件,然后粘贴以下内容<?xml version="1.0" encoding="UTF-8"?><settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
2019-12-12 09:17:16 470
原创 Error: unable to perform an operation on node 'rabbit@DESKTOP-7NEMOLJ'
解决方案:不应该安装到D:\Program Files (x86) 路径下,因为该路径中空格太多安装到D:\Program Files下,然后运行一下命令D:\Program Files\rabbitmq_server-3.7.3\sbin>rabbitmq-plugins.bat enable rabbitmq_management进入浏览器,输入:http://localhost...
2019-12-08 11:17:58 426
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人