摘要: 进入my.cnf文件//乱码修改 设置编码 character_set_server = utf8mb4 //编码 collation-server = utf8mb4_general_ci //连接数据库执行操作 init_connect='SET NAMES utf8mb4' 1.只有在普通用户 阅读全文
posted @ 2022-09-20 17:52 sowler 阅读(174) 评论(0) 推荐(0)
摘要: 1. nginx启动报错: Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -x 阅读全文
posted @ 2022-09-20 10:26 sowler 阅读(1016) 评论(0) 推荐(0)
摘要: public static <K, V> Map<K, V> parseListToMap(Collection<V> list, Function<V, K> mapper) { if (list == null || list.size() == 0) { return null; } Map< 阅读全文
posted @ 2022-09-16 13:40 sowler 阅读(29) 评论(0) 推荐(0)
摘要: 1.自动装配组件@Autowired和@Resource @Autowired @Autowired 注解属于spring注解 默认为 @Autowired(required=true), required为true表示注入bean的时候,该bean必须存在,否则就会注入失败报错。 为false表示 阅读全文
posted @ 2022-09-15 18:10 sowler 阅读(375) 评论(0) 推荐(0)
摘要: 1.@Conditional注解 @Conditional 是Spring4新提供的注解。 它的作用是按照一定的条件进行判断,满足条件给容器注册bean,否则不注入。 可以作用在方法上,也可以作用在类上。 使用的时候需要传入实现Condition接口类数组。 如果是类和方法都加了@Condition 阅读全文
posted @ 2022-09-15 13:45 sowler 阅读(181) 评论(0) 推荐(0)
摘要: 1.如果改子类有父类,则把父类加入子类的父ID中 private static List<MentVo> breadthParentFirst(List<MentVo> rootTree) { if (CollectionUtils.isEmpty(rootTree)) { return Lists 阅读全文
posted @ 2022-09-13 10:26 sowler 阅读(106) 评论(0) 推荐(0)
摘要: MySql执行分组sql报错: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db.tir1.display_name' which is not functiona 阅读全文
posted @ 2022-09-09 15:04 sowler 阅读(67) 评论(0) 推荐(0)
摘要: 根据意思可以看出 mysql执行的报文过大。需要我们设置允许的最大报文max_allowed_packet; org.springframework.dao.TransientDataAccessResourceException: ### Error querying database. Caus 阅读全文
posted @ 2022-09-08 15:40 sowler 阅读(1000) 评论(0) 推荐(0)
摘要: /** * MD5加密 * @param message 要进行MD5加密的字符串 * @return 加密结果为32位字符串 */ private static String getMD5(String message) { MessageDigest messageDigest = null; 阅读全文
posted @ 2022-09-05 15:26 sowler 阅读(101) 评论(0) 推荐(0)
摘要: 1.随机生成密钥对 /** * 随机生成密钥对 * @throws NoSuchAlgorithmException */ public static void genKeyPair() throws NoSuchAlgorithmException { // KeyPairGenerator类用于 阅读全文
posted @ 2022-09-05 15:18 sowler 阅读(1675) 评论(0) 推荐(0)