- 博客(104)
- 资源 (7)
- 收藏
- 关注
原创 No compiler is provided in this environment. Perhaps you are running on a JRE
mac 上跑maven项目报错No compiler is provided in this environment. Perhaps you are running on a JRE解决:1: 执行以下命令找到本地 Java 的jdk安装目录/usr/libexec/java_home -V执行 vim ~/.profile 设置下java的环境变量即可。执行完后so...
2021-10-31 11:40:47 282
原创 CAP分布式理论
C:一致性A:可用性P:分区容忍性案例:AP: eureka、redis主从哨兵机制CP: zookeeperBASEBA:基本可用S:软状态E:最终一致性基本可用:服务降级、流量削峰、延迟队列
2021-09-17 23:26:17 167
原创 系统架构设计
认知能力:架构设计认知、分析问题认知、能力边界认知设计认知:立足于点、连接成线、扩散成面底层逻辑:为什么要做拆分?为什么要做系统解耦?为什么要职责单一?为什么要关注开发效率?分析问题认知:业务:关注点系统能力管理者:关注点在人效管理技术:系统设计原则架构师与中高级研发区别 中高级研发 架构师 复杂度评估功能性复杂度:研发团队能力素质、it...
2021-09-17 22:57:21 188
原创 Flink本地安装
1:下载wgethttps://mirrors.bfsu.edu.cn/apache/flink/flink-1.12.2/flink-1.12.2-bin-scala_2.11.tgz2:解压tar -xzf flink-1.12.2-bin-scala_2.11.tgz3:cd flink-1.12.24:启动./bin/start-cluster.sh5:访问http://localhost:80816:停止./bin/stop-clust.
2021-04-12 22:22:15 156
原创 redis集群搭建
1:下载redis安装包并解压2:在redis目录下运行make3:创建redis-cluster目录4:cd redis-cluster5:创建6个数据目录mkdir data6379mkdir data6380mkdir data6381mkdir data6382mkdir data6383mkdir data63846:将redis目录下的redis.conf文件拷贝6份cp ../redis.conf redis6379.confcp ..
2021-03-23 22:37:43 119
原创 zookeeper集群安装
在本地安装zookeeper集群1:下载zookeeper安装包,解压到三个目录zookeeper1 zookeeper2 zookeeper32:将zookeeper1 zookeeper2 zookeeper3三个目录下的conf/zoo_sample.cfg重命名为 conf/zoo.cfg并将内容分别修改为:zookeeper1:tickTime=2000initLimit=10syncLimit=5dataDir=/Users/guanhongchang/Documen
2021-03-20 13:03:53 91
原创 nacos集群安装
下面讲述在本地安装nacos集群,使用不同端口,8848、8849、88501:下载nacos安装包解压得到nacos1 nacos2 nacos32:新建nacos数据库,运行nacos里面的nacos-mysql.sql3:修改nacos1 conf/application.properties修改为server.servlet.contextPath=/nacos### Default web server port:server.port=8848#*******.
2021-03-20 11:41:43 308
原创 NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata
spring boot集成nacos config报错NoClassDefFoundError: org/springframework/boot/context/properties/ConfigurationBeanFactoryMetadata原因是我的spring boot版本是2.4.3 , nacos config的版本是0.2.7两个版本不兼容导致,在spring boot 2.4之后删掉了ConfigurationBeanFactoryMetadata将spring boot
2021-03-10 21:29:56 26016 10
原创 Context initialization failed java.lang.UnsupportedOperationException: Parsing is not yet supported
按照nacos官网实践配置获取后报错。Context initialization failed java.lang.UnsupportedOperationException: Parsing is not yet supported for this type profile : example经查看源码得知,默认是从dataid去获取配置的类型。从而得到类型为dataId的值example,故报了这样的错误。解决方法:1: 设置dataid的值为加上后缀。这个.
2021-03-07 16:21:05 901
原创 sonar代码检查多模块maven项目
项目结构大致如下projectMy- -moduleOne --oneSub1 --oneSub2 -moduleTwo --twoSub1 --twoSub2-sonar-project.propertiessonar-project.propertie...
2019-01-29 15:02:28 7934 1
原创 jenkins+sonar报错
1:构建后报错ERROR: Error during SonarQube Scanner executionERROR: Task 'sonar-scanner' does not exist. Please use 'list' task to see all available tasks.ERROR: ERROR: Re-run SonarQube Scanner using t...
2019-01-29 14:33:53 4316 4
原创 centos7启动sonar之后报错
2019.01.29 11:18:58 WARN es[][o.e.c.a.s.ShardStateAction] [rules][0] received shard failed for shard id [[rules][0]], allocation id [mzxUa1F2TouocnegSCRCwA], primary term [0], message [failed recove...
2019-01-29 11:24:03 1109
原创 对接入log4j2报错
在对接入log4j2过程中发现报错"D:\Program Files\Java\jdk1.8.0_66\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote...
2019-01-15 11:27:33 4422
原创 使用maven私库的时候遇到的问题
1: Could not transfer artifact com.yolo:common:jar:1.0.0 from/to maven-releases (http://192.168.3.47:20010/repository/maven-releases/): Failed to transfer file: http://192.168.3.47:20010/repository...
2019-01-11 17:00:46 2642
原创 用ngnix做反向代理的项目swagger访问不了
1:swagger可以访问,但是点击具体的方法访问不了查询原因是因为域名后面的项目名不见了例如:正确的跳转链接是:https://xxxx/xiaohong/xxx但是实际上的链接变为了https://xxxx/xxx少了xiaohong这个项目名路径解决方法是在yml中设置#解决用域名访问不了swagger的解决方案springfox: documenta...
2019-01-11 10:38:27 5511
原创 spring boot对bean中的date对象输出成json之后的format问题
在get方法中加入@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")既可以解决时间格式问题
2018-11-22 09:58:19 565
原创 c++学到知识点
1:将boost::property_tree::ptree转化为string输出std::stringstream ss;boost::property_tree::json_parser::write_json (ss, tree);std::cout << ss.str () << std::endl;2:boost::asio::ip::address...
2018-11-07 10:22:22 217
原创 跑nanovault钱包客户端报错Uncaught ReferenceError: regeneratorRuntime is not defined
Uncaught ReferenceError: regeneratorRuntime is not defined at eval (TransportU2F.js:120) at eval (TransportU2F.js:142) at Object.eval (TransportU2F.js:228) at eval (TransportU2F.js:25...
2018-11-07 10:01:22 3286
原创 cmake报错undefined reference to `pthread_create'
CMakeFiles/helloboost.dir/condition_variable.cpp.o: In function `main':/usr/include/c++/7/thread:126: undefined reference to `pthread_create'collect2: error: ld returned 1 exit statusCMakeFiles/he...
2018-10-23 10:15:34 3291
原创 spring boot接入log4j2日志
1:<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <version>2.6.2</version>
2018-10-15 10:54:43 657
原创 从nano server中的python学习知识点总结
1:Python pass是空语句,是为了保持程序结构的完整性。pass 不做任何事情,一般用做占位语句。2:redis的使用sudo pip install redis import redisrdata = redis.StrictRedis(host='localhost', port=6379, db=0)rdata.hget(key,item)...
2018-10-12 15:56:30 299
原创 java生成指定位数的强随机数
1:public static String generateRandom(int length){ SecureRandom random = SecureRandomUtil.secureRandom(); byte[] randomBytes = new byte[length]; random.nextBytes(randomBytes...
2018-10-11 11:18:07 2244
转载 JAVA中String.format的用法
1.对整数进行格式化:%[index$][标识][最小宽度]转换方式 我们可以看到,格式化字符串由4部分组成,其中%[index$]的含义我们上面已经讲过,[最小宽度]的含义也很好理解,就是最终该整数转化的字符串最少包含多少位数字。我们来看看剩下2个部分的含义吧:标识: '-' 在最小宽度内左对齐,不可以与“用0填充”同时使用'#' 只适用于8进制和16进制,8进制...
2018-10-11 10:26:14 17706
原创 用java将一个int数字转换为指定位数二进制的字符串形式
/** * 将一个int数字转换为二进制的字符串形式。 * @param num 需要转换的int类型数据 * @param digits 要转换的二进制位数,位数不足则在前面补0 * @return 二进制的字符串形式 */ public static String toBinary(int num, int digits) {...
2018-10-11 10:10:57 23530 2
转载 默认日志logback配置解析
前言今天来介绍下Spring Boot如何配置日志logback,我刚学习的时候,是带着下面几个问题来查资料的,你呢如何引入日志? 日志输出格式以及输出方式如何配置? 代码中如何使用?正文Spring Boot在所有内部日志中使用Commons Logging,但是默认配置也提供了对常用日志的支持,如:Java Util Logging,Log4J, Log4J2和Logback...
2018-10-10 11:26:42 2039
原创 nano wallet ios源码解读
1:创建种子// MARK: - Create Seed- (NSData *)createSeed;{ void *mem = malloc(32); NSData *data = [[NSData alloc] initWithBytes:mem length:32]; unsigned char *bytePair = (unsigned char ...
2018-10-09 21:16:39 184
原创 spring boot中集成jedis操作redis
1:添加maven依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-redis</artifactId> <version>1.4.7.RELEASE</ver...
2018-10-09 21:13:14 2281 1
转载 解决replacement transaction underpriced以太坊交易异常
replacement transaction underpriced异常问题概述以太坊系列(ETH&ETC)在发送交易有三个对应的RPC接口,分别是ethsendTransaction、ethsendRawTransaction和personal_sendTransaction。这三个接口发送(或构造发送内容时)都需要一个参数nonce。官方文档对此参数的解释是:整数类型,...
2018-10-01 18:28:57 38903
原创 java对接微信公众号获取用户基本信息
package com.xcd.zc.controller;import com.fasterxml.jackson.core.JsonParseException;import com.fasterxml.jackson.databind.JsonMappingException;import com.fasterxml.jackson.databind.ObjectMapper;i...
2018-10-01 18:15:43 1265
原创 nano钱包 安卓版源码解读
1:生成钱包种子public static String generateSeed() { int numchars = 64; SecureRandom random = SecureRandomUtil.secureRandom(); byte[] randomBytes = new byte[numchars / 2]; random.nextBytes...
2018-09-30 23:35:44 420 1
原创 微信小程序开发过程中遇到的问题
1:scroll-view scroll-left属性安卓机不起作用解决方案:是由于scroll-view 的设置问题 去掉了display:flex就好了2:scroll-view 在android上不能滚动解决方案:增加overflow-y:auto; css样式就可以了 ...
2018-09-29 23:04:58 169
原创 Java实现hex和bytes之间相互转换
public static byte[] hexToBytes(String hex) { hex = hex.length() % 2 != 0 ? "0" + hex : hex; byte[] b = new byte[hex.length() / 2]; for (int i = 0; i < b.length; i++) { int in...
2018-09-29 22:59:32 12051 6
原创 java生成32位大写MD5值
/*** 生成32位大写MD5值*/private static final char HEX_DIGITS[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };public static String getMD5String(String str) ...
2018-09-29 22:57:04 3243
转载 java实现将参数排序并拼接起来
/*** 把数组所有元素排序,并按照“参数=参数值”的模式用“&”字符拼接成字符串** @param params* 需要排序并参与字符拼接的参数组* @return 拼接后字符串*/public static String createLinkString(Map<String, String> params) {List<String> ke...
2018-09-29 22:53:45 4537
原创 在ubuntu上部署nano节点
1:安装git sudo apt install git2:下载源码 git clone https://github.com/nanocurrency/raiblocks.git3:进入raiblocks目录git checkout releases/v12切换到 releases/v12这个分支4: sudo apt install gcc不然运行bash ci/boots...
2018-09-16 10:42:10 1507
原创 Building Qt
1:先安装qt的依赖库sudo apt-get install bison build-essential gperf flex ruby python libasound2-dev libbz2-dev libcap-dev \libcups2-dev libdrm-dev libegl1-mesa-dev libgcrypt11-dev libnss3-dev libpci-dev l...
2018-09-16 10:29:47 2189 1
原创 ubuntu18.04 安装Redis
1:下载redis源码wget http://download.redis.io/redis-stable.tar.gz2:解压 tar xvzf redis-stable.tar.gz3:进入redis-stable目录cd redis-stable4:build源码make5:测试一下build是否成功了make test如果看到如下输出\o/ Al...
2018-09-16 10:25:59 2007 1
原创 在centos7上搭建以太坊私有链
先总体说一下步骤:1.操作系统准备2. golang安装3.下载以太坊4. 安装以太坊5. 创世区块文件的准备6. 创世区块初始化7. 以太坊启动一 操作系统准备首先确认下linux版本(本人做测试时用的CentOS7.5)命令:cat /etc/redhat-releaseCentOS Linux release 7.5.1804 (Core) ...
2018-09-10 21:42:28 1132 1
原创 ubuntu18.04另外一种方式安装Supervisor教程
apt install python-pippip install supervisorfind / -name *supervisor* 通过这个命令发现supervisor被安装在了~/.local/bin里面了export PATH=~/.local/bin:$PATH 这是是临时的 没有永久永久方法:vi /etc/profile 输入i在底部插入export...
2018-09-08 11:39:36 1116
原创 ubuntu18.04安装supervisor进程管理
1:sudo apt install supervisord通过这种方式安装之后 supervisord会被安装到/etc/bin并且会自动加入到系统服务里面 随着系统启动而启动主配置文件在/etc/supervisor/里面2:执行sudo vi /etc/supervisor/supervisord.conf 打开文件编辑为如下; supervisor config fil...
2018-09-08 11:35:28 3343
JAVA接入web3j demo源码
2018-07-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人