- 博客(9)
- 资源 (6)
- 收藏
- 关注
原创 Mybatis的mapper-locations配置多个mapper路径
一、 在spring中使用在创建SqlSessionFactoryBean中指定参数,代码如下: @Bean public SqlSessionFactoryBean sqlSessionFactoryBean(DataSource dataSource) throws IOException { SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); ResourcePatternResol
2022-04-10 16:37:07 26231
原创 git命令别名配置
配置文件路径mac下路径为/Users/xxx/.gitconfig配置文件内容[user] name = xxx email = xxx@csdn.net[alias] st = status s = status co = checkout ci = commit cm = commit -m pl = pull ps = push br = branch re = rebase df = dif
2021-10-21 17:27:01 126
原创 Redis集群本地搭建-MAC
1、安装redisbrew install redis安装后的目录在/opt/homebrew/celler/redis配置文件在 /opt/homebrew/etc下面2、修改配置文件此处根据redis.conf文件复制出4个配置文件,3个主节点,1个从节点。修改端口号 port ,分别为7000、7001、7002、7003修改cluster-enabled为yes修改rdb保存目录为对应的端口号,dir /opt/homebrew/var/db/redis/redis-7000
2021-09-08 15:32:33 268
原创 Redis集群中给节点批量指定slot脚本
Redis集群中给节点批量指定slot脚本#!/bin/sh# 起始槽begin_slot=$1# 终点槽end_slot=$2# ipm_host=$3# 端口m_port=$4for((i=$begin_slot;i<=$end_slot;i++));do m_slot="${m_slot} ${i}"doneecho “add slots from ${begin_slot} to ${end_slot}!”redis-cli -h ${m_host} -p
2021-09-07 11:46:11 481 1
原创 继续前行
We are all in the gutter, but some of us are looking at the stars. 我们都生活在阴沟里,但仍有人仰望星空。王尔德 《温德米尔夫人的扇子》
2021-02-22 15:52:37 71
原创 IDEA启动项目时Command line is too long解决方案
Command line is too longidea启动项目时报Error running… Command line is too long…解决方案:在该项目文件夹.idea/workspace.xml中找到节点,添加如下配置即可。
2020-12-16 14:41:14 163
原创 MessageFormat格式化数值类型问题
在使用java.text.MessageFormat工具类进行格式化字符串时,应当注意在使用数值型参数替换占位符时,要将数值型参数转换为字符串,否则有可能产生与预期不符的字符串。增加英文逗号 如下示例 id,id2,id3,id4,id5丢失精度 如下示例 id2,id4,id5public static void main(String[] args){ int id = 123456; float id2 = 123456.789012F; long id3 = 123
2020-12-02 15:17:06 848
原创 使用BigInteger添加和校验权限
public static void main(String[] args) throws ParseException { int[] rights = {1, 2, 3, 4, 5, 6, 7, 8}; BigInteger sum = sumRights(rights); boolean flag = testRights(sum,9); System.out
2020-03-21 16:18:11 146
原创 Idea 终端打印的日志中文乱码
问题描述:windows环境,Idea中新建了一个简单的java应用,运行main方法时,控制台打印的中文字符乱码。如下图(改正后的结果):解决方法:点击Help按钮,选择Edit Custom VM Options...,在打开的vmoptions文件中新增一行“-Dfile.encoding=UTF-8”。重启Idea之后即可正常显示中文字符。...
2020-03-21 16:15:22 1049 2
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人