This post exclusively is designed to record the problems I’ve encountered when coding, together with how I solved them .
Perhaps, the format needs optimizing, but not now. Therefore, use this page as a DICTIONARY ONLY.
- 配置web.xml文件时报错如下, 原因是各标签属性(如过滤器, 监听器等)必须有顺序, 且顺序如下描述.
1 | The content of element type "web-app" must match |
idea cannot download source
terminal 执行即可:
1 | mvn dependency:resolve -Dclassifier=sources |

新建类时添加注释
Error: Command failed with exit 128: git
执行
1 | brew -v # 如果可以看到fatal: unsafe repository 。。。则执行下面两行设置safe.directory路径 |
| 功能 | Mac | Win |
|---|---|---|
| 重命名文件 | fn+shift+F6 | |
| 打开preference设置 | command+, | |
| 打开project structure | command+; | |
| 弹出generator框 新建构造 getter/setter等 | command+N | |
| 格式化代码 | command+alt+l | |
| debug | shift+control+D | |
| run | shift+control+R | |
| 重载pom | Home+command+i | |
| 类继承层级关系 | ctrl+h | |
| 往前/后一个制表符 | shift+Tab / Tab | |
| 提取称一个方法 | ||
| 1 | ⌥ + Enter | 快速修复/建议(导入类、实现方法等) |
| 2 | ⌘ + N | 生成代码 |
| 3 | ⌥ + ⇧ + Enter | 格式化markdown表格 |
| 4 | ⌥ + ⌘ + L | 格式化代码 |
| 5 | ⌘ + M | 切换到maven视图 |
| 6 | ⌘ + D | 切换到database视图 |
| 7 | ⌘ + ⌥ + R | run application or run maven goal |
| 8 | ⌃ + H | 查看类的继承关系 |
| 9 | ⌘ + , | 打开settings |
| 10 | ⌘ + ; | 打开project structure设置窗口 |
| 11 | ⌘ + 1 | 切换到project视图 |
| 12 | ⌘ + 2 | 切换到terminal视图 |
| 13 | ⌘ + 3 | 切换到commit视图 |
| 14 | ⌘ + 4 | 切换到run console |
| 15 | ⌘ + 5 | 切换到debug console |
| 16 | ⌘ + 6 | 查看git 视图 |
| 17 | ⌘ + 7 | |
| 18 | ⌘ + 8 | 切换到services视图可以查看DB查询结果, HTTP请求记录等 |
| 19 | ⌘ + 9 | |
| 20 | ⌘ + 0 | |
- 代码编辑相关 (Editing)
⌘ + N - 生成代码(Getter/Setter/Constructor等)
⌥ + Enter - 快速修复/建议(导入类、实现方法等)
⌃ + Space - 代码补全(基本)
⌃ + ⇧ + Space - 智能类型补全
⌘ + / - 注释/取消注释行
⌥ + ⌘ + L - 格式化代码(非常重要!)
⌘ + D - 复制当前行或选中的块
⌘ + ⌫ - 删除当前行
⌃ + ⇧ + J - 智能合并行
- 导航相关 (Navigation)
⌘ + O - 查找类
⇧ + ⌘ + O - 查找文件
⌘ + E - 最近文件
⌘ + B - 跳转到声明
⌥ + ⌘ + ←/→ - 返回/前进导航(在代码间跳转)
⌘ + F12 - 显示当前文件结构
- 运行和调试 (Run/Debug)
⌃ + R - 运行当前程序(Spring Boot应用)
⌃ + D - 调试当前程序
⌘ + F9 - 构建项目
F9 - 继续调试(Resume)
F8 - 单步跳过(Step Over)
特别针对Spring Boot开发的补充
⌘ + 1 - 切换项目窗口(然后使用箭头键导航)
⌘ + 2 - 切换Maven窗口(查看依赖、执行命令)
⇧ + ⌘ + F - 全局搜索
⇧ + ⌘ + A - 查找动作(输入动作名称)
Impacting factors:
- Getting up timely !!!
- Phone—Keep away from a desk when learning.
- Emotions—start to learn / read RIGHT NOW!
- Baby/honey/family - Talk to honey in advance
- Gym—3 times a week; weekends & Wed (No escorting)
- Cuddling - on weekends
- Associates—Only WFO noons, so be careful on that
- On Tube or when shitting, get the menu
- Retro & plan(personal) every night during 22:30 ~ 23:00
- Retro & plan(work) 30 mins before logging off
Must ! Every 22:30 ~ 23:00
| 日期 | planned | completed | ratio |
|---|---|---|---|
| 2025/12/15 | 225 | 200 | 80% |
| 2025/12/16 |
Plan for tomorrow(15th Dec - WFO):
- Learning:
finish 3-hour functional programming
- Working:
Design doc reading;
digging into code and create the repo for external API;
talk to Raja (with questions prepared in advance);
take leave for 29th~31st Dec - Life:
Get Menu for one day (Better on tube back home)
- Special
WFO days of upcoming 2 weeks: Mondays, Thursdays & Fridays.
1 | openssl req -x509 -nodes -sha256 -days 3650 -newkey rsa:2048 -keyout private.key -out certificate.crt |