-
Docker简介、安装与应用
Docker学习目标: 掌握Docker基础知识,能够理解Docker镜像与容器的概念 完成Docker安装与启动 掌握Docker镜像与容器相关命令 掌握Tomcat Nginx 等软件的常用应用的安装 掌握docker迁移与备份相关命令 能够运用Dockerfile编写创建容器的脚本 能够搭建与使用docker私有仓库 1 Docker简介1.1 什么是虚拟化 在计算... -
SpringBoot(04)--整合mybatis
记录Spring Boot如何整合MyBatis框架,并访问数据库。
没有使用mybatis注解,而是使用xml方式,这样可以让sql和业务代码分离,很清晰方便。
-
SpringBoot(03)--thymeleaf模板介绍(二)
Thymeleaf常用
0、基本变量取值
部分代码示例:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class HelloController {
public String hello(Model model){
model.addAttribute("hello","has");
model.addAttribute("ss","haaaaasss");
model.addAttribute("s","haaaaasss");
Person me = new Person(0,"亚凯",99);
model.addAttribute("me",me);
Person p1 = new Person(1,"亚凯",100);
Person p2 = new Person(2,"小蕾",100);
List<Person> persons = new ArrayList<>();
persons.add(p1);
persons.add(p2);
model.addAttribute("persons",persons);
return "hello";
}
} -
SpringBoot(01)--Hello World
Spring Boot 简介
世界上最好的文档来源自官方的《Spring Boot Reference Guide》,是这样介绍的:
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”…Most Spring Boot applications need very little Spring configuration.
Spring Boot(英文中是“引导”的意思),是用来简化Spring应用的搭建到开发的过程。应用开箱即用,只要通过 “run”(可能是 java -jar 或 tomcat 或 maven插件run 或 shell脚本),就可以启动项目。再就是Spring Boot 只要很少的Spring配置文件(properties,yml)。
-
阿里巴巴Java开发规约插件全球首发--转
造福Java程序猿的事必须顶,大家赶紧玩起来。
-
关于重写equals方法和hashCode方法
写在前面的话:
我之前写的动态博客 搜索功能实现时遇到了一个小问题,想保证数据库查询出来的同一笔数据是同一个对象,即如果两笔数据中包含相同的articleId(主键Id在表里是唯一的),那么就把这两笔数据作为同一个对象,这需要重写对象的equals方法和hashCode方法,具体代码如下:

></p>
