1. navicat10 的安装
2. 创建数据库



创建数据库的命名规则: 公司/学校名字简拼 __ 业务使用用途 ___ 使用者的角度
例如: xszx_ssm_test(测试库)、 xszx_ssm_dev(开发库)、xszx_ssm_prod(生产库)
字符集常用的三种:gbk2312、utf-8、utf8mb4, 如果要存储一些表情、生僻字,必须要使用 utf8mb4。
mysql8 将会默认使用utf8mb4
3. 创建数据表
新建表

编辑新建的表

新增一列:

最终表结构:
xszx_sys_student 学生表:

xszx_sys_teacher 班主任表:

4. 查询


左连接查询

select * from xszx_sys_student # 查询所有学生
select a.* from xszx_sys_student a # 表加别名
select a.student_name,case a.status when '0' then '在校'
when '1' then '休学'
when '2' then '退学'
when '3' then '当兵' end as student_status
from xszx_sys_student a # 字段加别名,数据通过 case when 转换
select a.student_name,case a.status when '0' then '在校'
when '1' then '休学'
when '2' then '退学'
when '3' then '当兵' end as student_status
from xszx_sys_student a where a.gender='1' # 查询男生的当前状态
select a.*,b.* from xszx_sys_student a left join xszx_sys_teacher b on
a.class_teacher_id = b.id # 左连接查询
select a.*,b.* from xszx_sys_student a inner join xszx_sys_teacher b on
a.class_teacher_id = b.id # 内连接查询
2022-12-17 git、maven
配置maven 仓库地址
修改 D:\Program Files\apache-maven-3.8.6\conf/settings.xml

这个路径根据自己安装的路径进行修改, 将阿里云的仓库放在mirrors 标签中
添加 依赖的安装位置
<localRepository>D:\Java\maven</localRepository>

idea 在构建 maven 项目时做的配置
打开 file - settings - build,execution,deployment- maven

修改 file - settings - build,execution,deployment- Maven - Runner
添加VM参数
-DarchetypeCatalog=internal

Maven构建相关
- 基于 maven构建开发模式的变化

- maven常用的指令
mvn clean # 对项目进行清理, 删除target目录下的所有编译文件
mvn compile # 编译项目, 出现target目录
mvn test # 运行测试
mvn package # 打包项目用到的所有文件,放到target目录
mvn install # 本地生成安装包,放到target目录
git 项目初始化
验证git安装成功
git --version
-
gitee 上创建一个空项目
-
建立与远程仓库的连接
image-20221217091534537.png
1. git init #运行后结果 Initialized empty Git repository in D:/workspace/peixun/test2/.git/
# 项目文件目前是 红色标记
# 注意有一个点 ,注意有一个点, 注意有一个点
2. git add . # 增加所有文件到版本进行管理
# 项目文件目前是 绿色标记
# 提交代码到本地仓库
3. git commit -m "国培 第一次提交"
# 项目文件目前是 白色标记
#和远程仓库建立连接
4. git remote add origin https://gitee.com/belovednn/guopei1.git
# 将本地仓库的元数据发送到远程仓库
5. git push -u origin "master"
推送到远程仓库后的反馈

git 开发相关流程

git代码提交流程

网友评论