一. 结构图 模板方法一般置为final,可以被子类继承,但不能覆盖。 二. 代码实现。 public abstract class Game { abstract void initialize(); abstract void startPlay(); abstract void endPlay ...
分类:
其他好文 时间:
2020-06-25 19:58:28
阅读次数:
49
转到MySQL的bin目录下,在此处打开终端 安装MySQL的服务 mysqld --install 初始化MySQL,把随机生成的密码保存下来 mysqld --initialize --console 随机生成的密码 QseEQHRdV9%z 开启MySQL服务 net start MySQL ...
分类:
数据库 时间:
2020-06-25 19:40:49
阅读次数:
64
##如何做单元测试 打开的src/test/下的测试入口,编写简单的http请求来测试;使用mockmvc进行,利用MockMvcResultHandlers.print()打印出执行结果。 @RunWith(SpringRunner.class) @SpringBootTest public cl ...
分类:
编程语言 时间:
2020-06-25 14:09:34
阅读次数:
56
Exception-Handling Overview Example Snippet for try-throw-catch (踹扔抓示例) try { Code to try; throw an exception (1) with a throw statement (2) or from f ...
分类:
其他好文 时间:
2020-06-24 22:08:41
阅读次数:
67
Linux git管理项目遇到的问题 ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways: - be incl ...
分类:
系统相关 时间:
2020-06-24 15:41:37
阅读次数:
129
idea 启动类有启动按钮,点击没反应问题 打开idea file-settings搜索插件找到Groovy这个然后把这个插件enable前面的对勾去掉即可。 idea 启动问题解决 Command line is too long. In order to reduce its length cl ...
分类:
其他好文 时间:
2020-06-24 13:57:26
阅读次数:
114
/** * Initialize your data structure here. */ var MyStack = function() { this.inQueue = []; this.outQueue = []; }; /** * Push element x onto stack. * ...
分类:
其他好文 时间:
2020-06-24 12:04:42
阅读次数:
54
/** * Initialize your data structure here. */ var MyQueue = function() { this.stack1 = []; this.stack2 = []; }; /** * Push element x to the back of qu ...
分类:
其他好文 时间:
2020-06-24 11:45:42
阅读次数:
59
MySQL报错:Cannot add or update a child row: a foreign key constraint fails 原因及解决方法 前几天增加了数据库中几张表的外键,结果调试接口的时候就报Cannot add or update a child row: a forei ...
分类:
数据库 时间:
2020-06-24 11:44:22
阅读次数:
59
1、概览 当多线程帮助我们提高应用性能的同时,它同时也带来一些问题,本文我们将借助几个小例子看下两个问题,死锁和活锁。 2、死锁 2.1、什么是死锁 死锁发生在当两个或多个线程一直在等待另一个线程持有的锁或资源的时候。这会导致一个程序可能会被拖垮或者直接挂掉,因为线程们都不能继续工作了。 经典的哲学 ...
分类:
编程语言 时间:
2020-06-24 00:24:55
阅读次数:
92