
Java
全栈独立开发者阿昌
这个作者很懒,什么都没留下…
展开
-
系统架构设计
认知能力:架构设计认知、分析问题认知、能力边界认知设计认知:立足于点、连接成线、扩散成面底层逻辑:为什么要做拆分?为什么要做系统解耦?为什么要职责单一?为什么要关注开发效率?分析问题认知:业务:关注点系统能力管理者:关注点在人效管理技术:系统设计原则架构师与中高级研发区别 中高级研发 架构师 复杂度评估功能性复杂度:研发团队能力素质、it...原创 2021-09-17 22:57:21 · 243 阅读 · 0 评论 -
spring boot在构造器上调用yaml中的值为null
这是因为在构造器里面该对象还没有实例化,所以这个注入的对象是为null,执行顺序是先执行构造器,然后注入值 解决方法:这个类implement InitializingBean实现其方法public void afterPropertiesSet() throws Exception {}将构造器里面要做的操作放到这个方法里面即可 ...原创 2018-09-05 22:03:28 · 1846 阅读 · 0 评论 -
java利用递归实现字符串全排列
import java.util.*;public class StringAllList { public List<String> permutation(char[] s, int from, int to) { List<String> result = new ArrayList<>(); if (to &l...原创 2018-09-06 20:01:26 · 1063 阅读 · 1 评论 -
用java将一个int数字转换为指定位数二进制的字符串形式
/** * 将一个int数字转换为二进制的字符串形式。 * @param num 需要转换的int类型数据 * @param digits 要转换的二进制位数,位数不足则在前面补0 * @return 二进制的字符串形式 */ public static String toBinary(int num, int digits) {...原创 2018-10-11 10:10:57 · 24204 阅读 · 2 评论 -
JAVA中String.format的用法
1.对整数进行格式化:%[index$][标识][最小宽度]转换方式 我们可以看到,格式化字符串由4部分组成,其中%[index$]的含义我们上面已经讲过,[最小宽度]的含义也很好理解,就是最终该整数转化的字符串最少包含多少位数字。我们来看看剩下2个部分的含义吧:标识: '-' 在最小宽度内左对齐,不可以与“用0填充”同时使用'#' 只适用于8进制和16进制,8进制...转载 2018-10-11 10:26:14 · 18007 阅读 · 0 评论 -
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 · 2320 阅读 · 0 评论 -
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 · 3382 阅读 · 0 评论 -
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 · 12551 阅读 · 6 评论 -
Android和JAVA中接入web3j
1:先启动geth节点geth --identity "xiaohong" --rpc --rpccorsdomain "*" --rpcaddr "192.168.1.105" --datadir "./" --port "30303" --nodiscover --rpcapi "personal,db,eth,net,web3,miner" --networkid 1999 c原创 2018-07-16 17:11:54 · 2453 阅读 · 0 评论 -
UnsupportedMimeTypeException about Jsoup
问题描述:原创 2014-06-25 10:29:53 · 932 阅读 · 0 评论 -
mysqladmin flush-hosts
问题描述: Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'jie'j原创 2014-05-27 09:00:13 · 1080 阅读 · 0 评论 -
mysql: Communications link failure
问题描述:原创 2014-06-07 17:57:10 · 753 阅读 · 0 评论 -
MySQL连接超时Communications link failure
1:问题描述:MySQL连接超时Communications link failure原创 2014-06-07 18:12:52 · 1056 阅读 · 0 评论 -
多重网络的解决方案
服务器上的网络显示多重网络时l原创 2014-06-07 14:52:31 · 1907 阅读 · 0 评论 -
错误: 程序包com.sun.xml.internal.bind.v2.schemagen.xmlschema不存在
问题描述:用ant来构建程序时报如下错误:原创 2014-06-21 17:10:01 · 15060 阅读 · 0 评论 -
项目jdk版本不对导致
错误描述:Project facet Java version 1.7 is not supported解决ce'l转载 2014-05-21 16:16:40 · 563 阅读 · 0 评论