Java
文章平均质量分 62
Erato Rabbit
这个作者很懒,什么都没留下…
展开
-
java8 new features - instant, localDate...
看上去是这样的,但还是有所区别,比如 LocalDateTime 对于用户来说,可能就只是一个简单的日期和时间的概念,考虑如下的 例子:两个人都在 2013年7月2日11点 出生,第一个人是在英国出生,而第二个是在加尼福利亚,如果我们问他们是在什么时候出生的话,则他们看上去都是 在同样的时间出生(就是 LocalDateTime 所表达的),但如果我们根据时间线(如格林威治时间线)去仔细考察,则会发现在出生的人会比在英国出生的人稍微晚几个小转载 2022-09-15 13:57:01 · 118 阅读 · 0 评论 -
JAVA 8 新特性之方法引用种的双冒号
双冒号运算操作符是类方法的句柄,lambda 表达式的一种简写,这种简写的学名叫 eta-conversion 或者叫 η-conversion。转载 2022-08-07 17:21:53 · 500 阅读 · 0 评论 -
低级错误之 实例化Servlet类异常
报的是找不到该类想一想,tomcat 手里的地图是谁?他拿什么路标找?web.xml查找 package name 路径,是对的,路径包里也确实有AddServlet.那怎么会找不到呢?最终原因,web.xml 类名少写一个 “v”. 路标牌子标错了。...原创 2022-06-29 17:48:44 · 1121 阅读 · 0 评论 -
RabbitMQ 在 Docker 上的安装和使用 install and use
1.利用 docker 安装 rabbitmq没有安装 docker的可以 访问 docker安装与使用注:这里配置的是阿里云的镜像加速器 点击配置镜像加速器(1).在网站红色框中 搜索 rabbitmq 点击 第一个 (2) 再次点击 Tags 标签(3) 找到 有 management 的版本(4)在该版本的右边有 docker pull rabbitmq:3.8-management-alpine 可以直接复制(5)安装 rabbitm转载 2022-06-06 15:18:35 · 374 阅读 · 0 评论 -
ibatis.type.TypeException: Could not resolve type alias ‘Payment’
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Payment'.原创 2022-06-01 17:47:11 · 349 阅读 · 1 评论 -
Mysql Server logs > Error logs
This section discusses how to configure the MySQL server for logging of diagnostic messages to the error log. For information about selecting the error message character set and language, see Section 10.6, “Error Message Character Set”, and Section 10.12,原创 2022-06-01 13:34:15 · 285 阅读 · 0 评论 -
Mysql Official site | Mysql Programs > Client Programs
This section describes client programs that connect to the MySQL server.mysql — The MySQL Command-Line Clientmysql is a simple SQL shell with input line editing capabilities.它支持交互式和非交互式使用。 交互使用时,查询结果以 ASCII 表格式显示。 当以非交互方式使用时(例如,作为过滤器),结果以制表符分隔的格式显示。 可以原创 2022-06-01 12:26:19 · 117 阅读 · 0 评论 -
maven.plugins:maven-archetype-plugin:RELEASE:generate
org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate——解决方案,idea 的版本升级到了IntelliJ IDEA 2019.3.3 x64,但是遇到了 Plugins 报红的情况,尝试很多方法,终于解决,现在做一下汇总。1、首先检查idea的 settings -> Build, Execution, Deployment -> Maven 和自己的本机路径是否属实2、检查 Mave原创 2022-06-01 10:49:02 · 5027 阅读 · 0 评论 -
solr 从 Mysql 导入数据 importData 失败
原因: Mysql 没设远程访问权限GRANT ALL ON *.* TO 'root'@'%';无法使用。ERROR 1410 (42000): You are not allowed to create a user with GRANT原因解释:1Starting with MySQL 8 you no longer can (implicitly) create a user using the GRANT command. Use CREATE USER instead, fo转载 2022-05-23 19:15:07 · 288 阅读 · 0 评论 -
“status“:405,“error“ Request method ‘POST‘ not supported“
报错信息-“status”:405,“error”:“Method Not Allowed”,“exception”:“org.springframework.web.HttpRequestMethodNotSupportedException”,“message”:“Request method ‘POST’ not supported”code:@Controllerpublic class EmpController { @Autowired private EmpServi原创 2022-05-19 20:29:10 · 1691 阅读 · 0 评论 -
Thymeleaf: Error resolving template [show], template might not exist or might not be accessible
报错信息Exception processing template “show”: Error resolving template [show], template might not exist or might not be accessible by any of the configured Template Resolvers[THYMELEAF][http-nio-8080-exec-1] Exception processing template "show": Error resolv原创 2022-05-19 17:10:15 · 568 阅读 · 0 评论 -
Unknown initial character set index ‘255‘ received from server
During attempt to create HibernateSession application fails with exception:Caused by: java.sql.SQLException: Unknown initial character set index‘255’ received from server. Initial client character set can be forcedvia the ‘characterEncoding’ property.转载 2022-05-19 16:48:32 · 322 阅读 · 0 评论 -
Command options for connecting to the MYSQL Server
This section describes options supported by most MySQL client programs that control how client programs establish connections to the server, whether connections are encrypted, and whether connections are compressed. These options can be given on the comman原创 2022-05-18 23:53:29 · 105 阅读 · 0 评论 -
linux 网络服务相关指令
重启网络服务三种方式1.systemdsystemctl restart network2.系统服务管理脚本/etc/init.d/network restart3.serviceservice network restart在 centos 8 中只能通过 nmcli 工具,使用激活网络会话或者连接网卡的方式#查看网络会话nmcli c s#查看某网络会话具体信息nmcli c s ethC#激活网络会话nmcli c up entX #查看网卡设备nmcli d#激原创 2022-05-18 00:44:15 · 196 阅读 · 0 评论 -
Linux 防火墙端口常用操作命令汇总 firewall ports
防火墙保卫系统免受外来侵袭,是系统重要组成部分,熟练操控防火墙是后台小伙伴的必备技能。以centos系统为基础,盘点整理一番防火墙相关的操作指令。查看防火墙运行状态systemctl status firewalld或者防火墙自带命令同样可以查看运行状态:firewall-cmd --state防火墙一定要运行起来,不要为了开放端口方便就直接关闭防火墙。1、防火墙的开启和关闭开启:systemctl start firewalld关闭:systemctl stop firewall转载 2022-05-17 19:51:43 · 328 阅读 · 0 评论 -
客户端访问 zookeeper Server 服务器报错 ConnectionLossException
从 idea 写了个客户端,想访问虚拟机上的 zookeeper Server报错内容zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for ...原因Linux 的防火墙处于安全考虑,默认不开放 ports 端口 (包括 zookeeper Server 的默认端口 2181) 的外部访问。所以客户端的访问会失败。解决方案首先查看防火墙运行状态systemctl sta原创 2022-05-17 17:45:07 · 376 阅读 · 0 评论 -
IDEA设置自动换行显示,Soft Wrap
本人idea 版本: 2019.3.5Settings > Editor > General > Soft Wrapssoft wrap files 一行打勾, 并添加上 *.java,分号分隔原创 2022-05-17 15:45:16 · 583 阅读 · 0 评论 -
The dependencies of some of the beans in the application context form a cycle-pagehelper
报错信息:APPLICATION FAILED TO STARTDescription:The dependencies of some of the beans in the application context form a cycle:┌──->──┐| com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration└──<-──┘Action:Relying upon circular references转载 2022-05-05 12:49:39 · 789 阅读 · 0 评论 -
eclipse注释模板怎么设置
设置注释模板:Window --> Preference --> Java->Code Style --> Code Template然后展开Comments节点就是所有需设置注释的元素。本文现就每一个元素逐一给大家介绍一下。文件(Files)注释标签:/** * @Title: ${file_name} * @Package ${package_name} * @Description: ${todo}(用一句话描述该文件做什么) * @author ${user} * @原创 2022-01-24 11:52:45 · 147 阅读 · 0 评论 -
Abstract & Interface
An abstract class is a class that is declared abstract—it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.An abstract method is a method that is declared without an implementation (方法体) (withou原创 2022-01-24 11:24:40 · 228 阅读 · 0 评论 -
[练习题] 抽象类 接口 内部类
abstract 能修饰哪些结构? 修饰以后,有哪些特点?类、方法。 抽象类不能实例化,要提供子类;抽象方法,只定义了一种功能的标准,具体的执行,需要子类去实现(重写)。接口是否能继承接口? 抽象类是否能实现(implements)接口? 抽象类是否能继承非抽象类?声明抽象类,并包含抽象方法, 测试类中创建一个继承抽象类的匿名子类对象。抽象类和接口有哪些共同点和区别?如何定义静态成员内部类 和 非静态成员内部类 的对象?原创 2022-01-24 11:07:42 · 281 阅读 · 0 评论 -
[练习题] 多态性 equals() 包装类
如何实现向下转型?需要注意什么问题?如何解决这些问题?使用强转符 ()Person p = new Man();Man m1 = (Man)p;但可能 ClassCastException 异常。解决方法:在强转前用 instanceof 判断类型。if(objName instanceof ClassType){ //...}if(p instanceof Man){ Man m = (Man)p;}== 和 equals() 有什么区别?原创 2022-01-22 18:20:49 · 127 阅读 · 0 评论 -
[中英夹杂]JavaOOP面向对象编程基础知识
Class Basicmembers: 属性 field 方法 method 构造器 Constructor ; 代码块 block 内部类 innerIntroductionmemeroy analyzeAttributesMember variable vs Local variabledeclare 位置不同成员变量 member variable : 直接 declare 在{ }里。局部变量 local variable :declare 在 method 内,method原创 2022-01-21 09:03:07 · 312 阅读 · 0 评论 -
eclipse如何设置注释模板
设置注释模板的:Window --> Preference --> Java->Code Style --> Code Template然后展开Comments节点就是所有需设置注释的元素。本文转载 2022-01-18 18:11:53 · 397 阅读 · 0 评论 -
Java OOP 构造函数Constructor
可以使用构造函数Constructor为对象object属性提供初始值initial value。构造函数名称name必须与其类名class name相同。原创 2022-01-16 23:05:55 · 214 阅读 · 0 评论