- 博客(29)
- 收藏
- 关注
原创 JAVA-SDK-Excel4j使用遇见的问题
1.com.github.crab2died.exceptions.Excel4JException: java.beans.IntrospectionException: Can not get the getter or setter method写入的对象类的属性要小写不能大写错误展示: 正确展示:...
2020-08-14 11:38:00
44
原创 解决Zookeeper出现Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerM...
Error: Could not find or load main class org.apache.zookeeper.server.quorum.QuorumPeerMain1. 安装maven# 安装wget http://mirrors.hust.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.t...
2020-07-20 20:56:00
54
原创 maven项目打包时jar中不包含依赖
<build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <appendAssemblyId...
2020-07-16 13:04:00
43
原创 CentOS_7中的zookeeper安装
下载zookeeperwget http://mirror.bit.edu.cn/apache/zookeeper/zookeeper-3.5.8/apache-zookeeper-3.5.8.tar.gz解压tar -zxvf apache-zookeeper-3.5.8.tar.gz修改zookeeper配置cd /usr/local/apache-zookeeper-3.5.8/...
2020-07-16 10:06:00
39
原创 SpringBoot集成Redis出现WRONGTYPE Operation against a key holding the wrong kind of value错误
WRONGTYPE Operation against a key holding the wrong kind of value原因: 因为Redis数据库中已经存在当前KEY对应的值,并且你现在的操作的数据类型于当前数据库中KEY对应的数据类型不一样。比如: Redis中存在一个key为laowang对应的值为老王 -----》 laowang:老王 问题所在: se...
2020-07-09 15:48:00
23
原创 主机访问虚拟机中Redis
1.保证虚拟机安装Redis2.修改Redis配置文件2.1 关闭Redis配置保护2.2 注释bind绑定IP2.3 设置Redis访问密码3. 修改虚拟机设置3.1 添加主机端口转发虚拟机4. 关闭虚拟机防火墙...
2020-07-02 10:28:00
23
原创 使用SpringS声明式的开启事务
1. 导入事务依赖 xmlns:tx="http://www.springframework.org/schema/tx" http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd2. 声明事务<!--配置...
2020-05-13 09:46:00
74
原创 使用Spring整合Mybatis
1. 导入maven依赖 <!--依赖--> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> ...
2020-05-12 22:02:00
18
原创 AOP的三种实现方式之一通过xml配置文件实现
1. 在配置文件中导入AOP依赖xmlns:aop="http://www.springframework.org/schema/aop"http://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop.xsd 2. 编写接口package com.yd.de...
2020-05-12 13:10:00
24
原创 AOP的三种实现方式之一通过接口实现
AOP:面向切面编程,其核心思想就是,将原本代码中的公共业务进行抽取,如:日志、事务、权限验证等;实现公共业务代码的复用性,并且使特定业务的功能更纯粹,关注点减少。AOP的本质是通过动态代理实现,通过反射机制获取动态代理对象,实现对公共业务的抽取。这里简单介绍一下AOP的一些专有名词。横切关注点:就是一个功能,如:视图、权限验证、日志等,这里用权限验证举例;切面(Aspect):实现权限...
2020-05-11 22:21:00
13
原创 动态代理工具类
package com.yd.demo03;import java.lang.reflect.InvocationHandler;import java.lang.reflect.Method;import java.lang.reflect.Proxy;// 动态代理生成工具类public class ProxyInvocationHandler implements Invo...
2020-05-11 21:17:00
16
原创 Spring使用JDBC错误总结
1.The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property)...
2020-05-11 09:23:00
34
原创 使用java类配置Spring
1. 使用@Configuration标记一个配置类@Configurationpublic class JavaConfig { @Bean public User user(){ return new User(); }}@Configuration的本质就是一个@Compontent(组件),也是将配置类注册到Spring的容器中。...
2020-05-08 21:51:00
18
原创 Spring的注解开发
1. 想要使用spring的注解进行开发,需要先在配置文件中导入依赖。想要使用component组件及其衍生的组件进行开发,则需要在配置文件中添加component扫描路径。<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" ...
2020-05-08 21:18:00
15
原创 Spring通过注解实现自动装配
1. 导入注解依赖并开启支持注解;<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns...
2020-05-08 20:32:00
22
原创 Spring的依赖注入之p命名空间和c命名空间
p命名空间是set注入的一种快捷实现方式,想要使用p命名空间注入,需要注意一下几点。1. 实体类中必须有set方法;2. 实体类中必须有无参构造器(默认存在);3. 必须导入p命名空间注入方式依赖。xml依赖代码:xmlns:p="http://www.springframework.org/schema/p"导入后即可使用<bean id="user" class="...
2020-05-07 21:15:00
27
原创 Spring的依赖注入之多数据结构注入
配置文件中的bean代码<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schema...
2020-05-07 20:44:00
20
原创 Spring的配置文件模版
<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="htt...
2020-05-07 20:42:00
19
原创 使用UniApp对接一言API接口
一言Api接口地址:https://api.uixsj.cn/hitokoto/get配置文件我就不写了<template> <view class="uni-padding-wrap uni-common-mt" > <view> {{data.content}} </view>...
2020-05-07 15:12:00
35
原创 Log4J使用
什么是Log4j?Log4j是Apache的一个开源项目,通过使用Log4j,我们可以控制日志信息输送的目的地是控制台、文件、GUI组件我们也可以控制每一条日志的输出格式;通过定义每一条日志信息的级别,我们能够更加细致地控制日志的生成过程。通过一个配置文件来灵活地进行配置,而不需要修改应用的代码。Log4J的使用:1. 导入maven依赖 <...
2020-05-05 13:16:00
14
原创 Python面试题总结
谈谈你对Python的理解Python是一门解释型语言,它就相当于找了个翻译,你说一句话它给计算机翻译一句话;Python也是一门动态类型语言,在声明变量的时候不需要指定数据类型Python还支持多继承(其他语言不支持)Python语言语法简洁、代码编写快但是运行速度比其他语言要慢,但是python允许扩展C语言,可以很好的用于科学计算;Python是一门强类型语言强弱类型语言强类型语言就...
2020-04-14 16:58:00
29
原创 Jupyter的安装和基本使用
1. 安装Jupyterpip install jupyter2. Jupyter的初次使用# 进入虚拟环境workon ai# 输入命令jupyter notebook本地notebook的默认URL为:http://localhost:8888想让notebook打开指定目录,只要进入此目录后执行命令即可3. Jupyter的常用命令及操作简介:两种模式通用快捷...
2020-03-28 11:24:00
24
原创 Windows系统安装Python虚拟环境并使用virtualenv管理
在安装虚拟环境之前一定要确保,本机已经安装了Python解释器。1. 安装虚拟环境管理器(virtualenv)pip install virtualenv2. 修改mkvirtualenv文件,自定义虚拟环境地址路径找到系统中的python解释器的安装路径;然后找到Scripts文件夹中的mkvirtualenv.bat文件修改mkvirtualenv.bat...
2020-03-27 19:42:00
52
原创 MySQL数据库构造测试数据
1. 蠕虫复制蠕虫复制,2的n次方的形式构造测试数据。insert into 表名(字段名,..) select 字段名,.. from 表名;INSERT INTO test SELECT * FROM test;2. 存储过程(MySQL函数)delimiter $$ #声明存储过程的结束符号为$$ create procedure auto_insert1() BEGIN ...
2020-03-17 18:04:00
50
原创 PyCharm设置自定义代码段
1. 打开file>settings选项2. 找到Editor3. 添加自定义代码段4. 配置PyCharm,使用自定义代码段5. 查看是否定义成功
2020-03-15 16:58:00
43
原创 CentOS-7安装python虚拟环境
安装虚拟环境的前提是你需要CentOS安装python解释器。1. 安装虚拟环境模块pip3 install virtualenv -i https://mirrors.aliyun.com/pypi/simple/2. 安装virtualenvwrapper 工具管理虚拟环境pip3 install virtualenvwrapper -i https://mirrors.ali...
2020-03-15 16:15:00
23
原创 Flask框架之配置日志信息
日志模板:from logging.handlers import RotatingFileHandlerimport loggingimport osBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))def setup_log(config): """配置日志""" # ...
2020-03-06 19:16:00
33
原创 Flask框架之基本查询语法
基本语法格式:模型类名.query[.过滤器].执行器常用的SQLAlchemy查询过滤器过滤器说明filter()把过滤器添加到原查询上,返回一个新查询filter_by()把等值过滤器添加到原查询上,返回一个新查询limit使用指定的值限定原查询返回的结果offset()偏移原查询返回的结果,返回一个新查询order_by()根据指定条件对...
2020-03-06 09:43:00
33
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人