18 changed files with 566 additions and 0 deletions
-
4.idea/shelf/_2025_11_7_19_25____.xml
-
4.idea/shelf/_2025_11_7_19_29____.xml
-
4.idea/shelf/_2025_11_7_19_29____1.xml
-
92.idea/shelf/在变基之前未提交的更改_[更改]2/shelved.patch
-
71.idea/shelf/在进行签出之前于_2025_11_7_19_25_取消提交了更改_[更改]/shelved.patch
-
17.idea/shelf/在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]/shelved.patch
-
54.idea/shelf/在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]1/shelved.patch
-
6.idea/vcs.xml
-
BIN吴光慧学习笔记/11.7/11.7学习总结-吴光慧.pdf
-
BIN吴光慧学习笔记/11.7/11.7股票.docx
-
BIN孙维宁学习笔记/11.7孙维宁学习笔记.docx
-
BIN孙维宁学习笔记/11.8孙维宁学习笔记.docx
-
BIN孙维宁学习笔记/孙维宁-双十一机器人项目方案学习笔记-11.8.docx
-
BIN孙维宁学习笔记/孙维宁-对企业文化和股票基础的一些巩固和复习-11.7.docx
-
BIN尹顺宇学习笔记/尹顺宇11.07作业/11.07学习总结.docx
-
314尹顺宇学习笔记/尹顺宇11.07作业/尹顺宇11.07SpringBoot.md
-
BIN尹顺宇学习笔记/尹顺宇11.07作业/尹顺宇11.07SpringBoot.pdf
-
BIN尹顺宇学习笔记/尹顺宇11.07作业/尹顺宇11.07股票学习总结.docx
@ -0,0 +1,4 @@ |
|||||
|
<changelist name="在进行签出之前于_2025_11_7_19_25_取消提交了更改_[更改]" date="1762514755057" recycled="true" deleted="true"> |
||||
|
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/在进行签出之前于_2025_11_7_19_25_取消提交了更改_[更改]/shelved.patch" /> |
||||
|
<option name="DESCRIPTION" value="在进行签出之前于 2025/11/7 19:25 取消提交了更改 [更改]" /> |
||||
|
</changelist> |
||||
@ -0,0 +1,4 @@ |
|||||
|
<changelist name="在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]" date="1762514943009" recycled="false" toDelete="true"> |
||||
|
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]/shelved.patch" /> |
||||
|
<option name="DESCRIPTION" value="在进行签出之前于 2025/11/7 19:29 取消提交了更改 [更改]" /> |
||||
|
</changelist> |
||||
@ -0,0 +1,4 @@ |
|||||
|
<changelist name="在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]1" date="1762514952204" recycled="true" deleted="true"> |
||||
|
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/在进行签出之前于_2025_11_7_19_29_取消提交了更改_[更改]1/shelved.patch" /> |
||||
|
<option name="DESCRIPTION" value="在进行签出之前于 2025/11/7 19:29 取消提交了更改 [更改]" /> |
||||
|
</changelist> |
||||
@ -0,0 +1,92 @@ |
|||||
|
Index: .idea/workspace.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"AutoImportSettings\">\r\n <option name=\"autoReloadType\" value=\"SELECTIVE\" />\r\n </component>\r\n <component name=\"ChangeListManager\">\r\n <list default=\"true\" id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\">\r\n <change beforePath=\"$PROJECT_DIR$/.idea/workspace.xml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/.idea/workspace.xml\" afterDir=\"false\" />\r\n </list>\r\n <option name=\"SHOW_DIALOG\" value=\"false\" />\r\n <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\r\n <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\r\n <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\r\n </component>\r\n <component name=\"Git.Settings\">\r\n <option name=\"RECENT_BRANCH_BY_REPOSITORY\">\r\n <map>\r\n <entry key=\"$PROJECT_DIR$\" value=\"dev\" />\r\n </map>\r\n </option>\r\n <option name=\"RECENT_GIT_ROOT_PATH\" value=\"$PROJECT_DIR$\" />\r\n </component>\r\n <component name=\"ProjectColorInfo\">{\r\n "associatedIndex": 0\r\n}</component>\r\n <component name=\"ProjectId\" id=\"353KyGCnYJFbynSTGPtdrLF9Edm\" />\r\n <component name=\"ProjectViewState\">\r\n <option name=\"hideEmptyMiddlePackages\" value=\"true\" />\r\n <option name=\"showLibraryContents\" value=\"true\" />\r\n </component>\r\n <component name=\"PropertiesComponent\"><![CDATA[{\r\n \"keyToString\": {\r\n \"ModuleVcsDetector.initialDetectionPerformed\": \"true\",\r\n \"RunOnceActivity.ShowReadmeOnStart\": \"true\",\r\n \"RunOnceActivity.git.unshallow\": \"true\",\r\n \"git-widget-placeholder\": \"sunweining/feature-20251028175924-学习\",\r\n \"last_opened_file_path\": \"D:/study_dbqb/Dbqb_Study/孙维宁学习笔记\",\r\n \"node.js.detected.package.eslint\": \"true\",\r\n \"node.js.selected.package.eslint\": \"(autodetect)\",\r\n \"node.js.selected.package.tslint\": \"(autodetect)\",\r\n \"nodejs_package_manager_path\": \"npm\",\r\n \"vue.rearranger.settings.migration\": \"true\"\r\n }\r\n}]]></component>\r\n <component name=\"RecentsManager\">\r\n <key name=\"CopyFile.RECENT_KEYS\">\r\n <recent name=\"D:\\study_dbqb\\Dbqb_Study\\孙维宁学习笔记\" />\r\n </key>\r\n </component>\r\n <component name=\"SharedIndexes\">\r\n <attachedChunks>\r\n <set>\r\n <option value=\"bundled-jdk-9823dce3aa75-fbdcb00ec9e3-intellij.indexing.shared.core-IU-251.26927.53\" />\r\n <option value=\"bundled-js-predefined-d6986cc7102b-09060db00ec0-JavaScript-IU-251.26927.53\" />\r\n </set>\r\n </attachedChunks>\r\n </component>\r\n <component name=\"TaskManager\">\r\n <task id=\"LOCAL-00001\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983013107</created>\r\n <option name=\"number\" value=\"00001\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00001\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983013107</updated>\r\n </task>\r\n <task id=\"LOCAL-00002\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983018907</created>\r\n <option name=\"number\" value=\"00002\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00002\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983018907</updated>\r\n </task>\r\n <task id=\"LOCAL-00003\" summary=\"11.5\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1762333284024</created>\r\n <option name=\"number\" value=\"00003\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00003\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1762333284024</updated>\r\n </task>\r\n <task active=\"true\" id=\"Default\" summary=\"默认任务\">\r\n <changelist id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\" />\r\n <created>1762333567204</created>\r\n <option name=\"number\" value=\"Default\" />\r\n <option name=\"presentableId\" value=\"Default\" />\r\n <updated>1762333567204</updated>\r\n <workItem from=\"1762333568292\" duration=\"691000\" />\r\n <workItem from=\"1762390006167\" duration=\"599000\" />\r\n <workItem from=\"1762421259945\" duration=\"616000\" />\r\n </task>\r\n <option name=\"localTasksCounter\" value=\"4\" />\r\n <servers />\r\n </component>\r\n <component name=\"TypeScriptGeneratedFilesManager\">\r\n <option name=\"version\" value=\"3\" />\r\n </component>\r\n <component name=\"VcsManagerConfiguration\">\r\n <MESSAGE value=\"11.1\" />\r\n <MESSAGE value=\"11.5\" />\r\n <option name=\"LAST_COMMIT_MESSAGE\" value=\"11.5\" />\r\n </component>\r\n</project> |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
|
||||
|
--- a/.idea/workspace.xml (revision c455a0312d16e71a9a58ec4f162e0e7463461374)
|
||||
|
+++ b/.idea/workspace.xml (date 1762515114727)
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
<option name="autoReloadType" value="SELECTIVE" /> |
||||
|
</component> |
||||
|
<component name="ChangeListManager"> |
||||
|
- <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.5">
|
||||
|
+ <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.6">
|
||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |
||||
|
</list> |
||||
|
<option name="SHOW_DIALOG" value="false" /> |
||||
|
@@ -15,7 +15,7 @@
|
||||
|
<component name="Git.Settings"> |
||||
|
<option name="RECENT_BRANCH_BY_REPOSITORY"> |
||||
|
<map> |
||||
|
- <entry key="$PROJECT_DIR$" value="dev" />
|
||||
|
+ <entry key="$PROJECT_DIR$" value="sunweining/feature-20251028175924-学习" />
|
||||
|
</map> |
||||
|
</option> |
||||
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> |
||||
|
@@ -28,20 +28,20 @@
|
||||
|
<option name="hideEmptyMiddlePackages" value="true" /> |
||||
|
<option name="showLibraryContents" value="true" /> |
||||
|
</component> |
||||
|
- <component name="PropertiesComponent"><![CDATA[{
|
||||
|
- "keyToString": {
|
||||
|
- "ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
|
- "RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
|
- "RunOnceActivity.git.unshallow": "true",
|
||||
|
- "git-widget-placeholder": "sunweining/feature-20251028175924-学习",
|
||||
|
- "last_opened_file_path": "D:/study_dbqb/Dbqb_Study/孙维宁学习笔记",
|
||||
|
- "node.js.detected.package.eslint": "true",
|
||||
|
- "node.js.selected.package.eslint": "(autodetect)",
|
||||
|
- "node.js.selected.package.tslint": "(autodetect)",
|
||||
|
- "nodejs_package_manager_path": "npm",
|
||||
|
- "vue.rearranger.settings.migration": "true"
|
||||
|
+ <component name="PropertiesComponent">{
|
||||
|
+ "keyToString": {
|
||||
|
+ "ModuleVcsDetector.initialDetectionPerformed": "true",
|
||||
|
+ "RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
|
+ "RunOnceActivity.git.unshallow": "true",
|
||||
|
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
|
+ "last_opened_file_path": "D:/study_dbqb/Dbqb_Study/孙维宁学习笔记",
|
||||
|
+ "node.js.detected.package.eslint": "true",
|
||||
|
+ "node.js.selected.package.eslint": "(autodetect)",
|
||||
|
+ "node.js.selected.package.tslint": "(autodetect)",
|
||||
|
+ "nodejs_package_manager_path": "npm",
|
||||
|
+ "vue.rearranger.settings.migration": "true"
|
||||
|
} |
||||
|
-}]]></component>
|
||||
|
+}</component>
|
||||
|
<component name="RecentsManager"> |
||||
|
<key name="CopyFile.RECENT_KEYS"> |
||||
|
<recent name="D:\study_dbqb\Dbqb_Study\孙维宁学习笔记" /> |
||||
|
@@ -89,8 +89,18 @@
|
||||
|
<workItem from="1762333568292" duration="691000" /> |
||||
|
<workItem from="1762390006167" duration="599000" /> |
||||
|
<workItem from="1762421259945" duration="616000" /> |
||||
|
+ <workItem from="1762492519774" duration="992000" />
|
||||
|
+ <workItem from="1762515015836" duration="99000" />
|
||||
|
+ </task>
|
||||
|
+ <task id="LOCAL-00004" summary="11.6">
|
||||
|
+ <option name="closed" value="true" />
|
||||
|
+ <created>1762514905809</created>
|
||||
|
+ <option name="number" value="00004" />
|
||||
|
+ <option name="presentableId" value="LOCAL-00004" />
|
||||
|
+ <option name="project" value="LOCAL" />
|
||||
|
+ <updated>1762514905809</updated>
|
||||
|
</task> |
||||
|
- <option name="localTasksCounter" value="4" />
|
||||
|
+ <option name="localTasksCounter" value="5" />
|
||||
|
<servers /> |
||||
|
</component> |
||||
|
<component name="TypeScriptGeneratedFilesManager"> |
||||
|
@@ -99,6 +109,7 @@
|
||||
|
<component name="VcsManagerConfiguration"> |
||||
|
<MESSAGE value="11.1" /> |
||||
|
<MESSAGE value="11.5" /> |
||||
|
- <option name="LAST_COMMIT_MESSAGE" value="11.5" />
|
||||
|
+ <MESSAGE value="11.6" />
|
||||
|
+ <option name="LAST_COMMIT_MESSAGE" value="11.6" />
|
||||
|
</component> |
||||
|
</project> |
||||
|
\ No newline at end of file |
||||
@ -0,0 +1,71 @@ |
|||||
|
Index: .idea/vcs.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
|
||||
|
new file mode 100644 |
||||
|
--- /dev/null (date 1762492556475)
|
||||
|
+++ b/.idea/vcs.xml (date 1762492556475)
|
||||
|
@@ -0,0 +1,6 @@
|
||||
|
+<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
+<project version="4">
|
||||
|
+ <component name="VcsDirectoryMappings">
|
||||
|
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
|
+ </component>
|
||||
|
+</project>
|
||||
|
\ No newline at end of file |
||||
|
Index: .idea/shelf/___1.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><changelist name=\"在变基之前未提交的更改_[更改]1\" date=\"1762333474424\" recycled=\"true\" deleted=\"true\">\r\n <option name=\"PATH\" value=\"$PROJECT_DIR$/.idea/shelf/在变基之前未提交的更改_[更改]1/shelved.patch\" />\r\n <option name=\"DESCRIPTION\" value=\"在变基之前未提交的更改 [更改]\" />\r\n</changelist> |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/shelf/___1.xml b/.idea/shelf/___1.xml
|
||||
|
--- a/.idea/shelf/___1.xml (revision c455a0312d16e71a9a58ec4f162e0e7463461374)
|
||||
|
+++ b/.idea/shelf/___1.xml (date 1762425268120)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
-<changelist name="在变基之前未提交的更改_[更改]1" date="1762333474424" recycled="true" deleted="true">
|
||||
|
+<changelist name="在变基之前未提交的更改_[更改]1" date="1762425084937" recycled="false" toDelete="true">
|
||||
|
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/在变基之前未提交的更改_[更改]1/shelved.patch" /> |
||||
|
<option name="DESCRIPTION" value="在变基之前未提交的更改 [更改]" /> |
||||
|
</changelist> |
||||
|
\ No newline at end of file |
||||
|
Index: .idea/workspace.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"AutoImportSettings\">\r\n <option name=\"autoReloadType\" value=\"SELECTIVE\" />\r\n </component>\r\n <component name=\"ChangeListManager\">\r\n <list default=\"true\" id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\">\r\n <change beforePath=\"$PROJECT_DIR$/.idea/workspace.xml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/.idea/workspace.xml\" afterDir=\"false\" />\r\n </list>\r\n <option name=\"SHOW_DIALOG\" value=\"false\" />\r\n <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\r\n <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\r\n <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\r\n </component>\r\n <component name=\"Git.Settings\">\r\n <option name=\"RECENT_BRANCH_BY_REPOSITORY\">\r\n <map>\r\n <entry key=\"$PROJECT_DIR$\" value=\"dev\" />\r\n </map>\r\n </option>\r\n <option name=\"RECENT_GIT_ROOT_PATH\" value=\"$PROJECT_DIR$\" />\r\n </component>\r\n <component name=\"ProjectColorInfo\">{\r\n "associatedIndex": 0\r\n}</component>\r\n <component name=\"ProjectId\" id=\"353KyGCnYJFbynSTGPtdrLF9Edm\" />\r\n <component name=\"ProjectViewState\">\r\n <option name=\"hideEmptyMiddlePackages\" value=\"true\" />\r\n <option name=\"showLibraryContents\" value=\"true\" />\r\n </component>\r\n <component name=\"PropertiesComponent\"><![CDATA[{\r\n \"keyToString\": {\r\n \"ModuleVcsDetector.initialDetectionPerformed\": \"true\",\r\n \"RunOnceActivity.ShowReadmeOnStart\": \"true\",\r\n \"RunOnceActivity.git.unshallow\": \"true\",\r\n \"git-widget-placeholder\": \"sunweining/feature-20251028175924-学习\",\r\n \"last_opened_file_path\": \"D:/study_dbqb/Dbqb_Study/孙维宁学习笔记\",\r\n \"node.js.detected.package.eslint\": \"true\",\r\n \"node.js.selected.package.eslint\": \"(autodetect)\",\r\n \"node.js.selected.package.tslint\": \"(autodetect)\",\r\n \"nodejs_package_manager_path\": \"npm\",\r\n \"vue.rearranger.settings.migration\": \"true\"\r\n }\r\n}]]></component>\r\n <component name=\"RecentsManager\">\r\n <key name=\"CopyFile.RECENT_KEYS\">\r\n <recent name=\"D:\\study_dbqb\\Dbqb_Study\\孙维宁学习笔记\" />\r\n </key>\r\n </component>\r\n <component name=\"SharedIndexes\">\r\n <attachedChunks>\r\n <set>\r\n <option value=\"bundled-jdk-9823dce3aa75-fbdcb00ec9e3-intellij.indexing.shared.core-IU-251.26927.53\" />\r\n <option value=\"bundled-js-predefined-d6986cc7102b-09060db00ec0-JavaScript-IU-251.26927.53\" />\r\n </set>\r\n </attachedChunks>\r\n </component>\r\n <component name=\"TaskManager\">\r\n <task id=\"LOCAL-00001\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983013107</created>\r\n <option name=\"number\" value=\"00001\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00001\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983013107</updated>\r\n </task>\r\n <task id=\"LOCAL-00002\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983018907</created>\r\n <option name=\"number\" value=\"00002\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00002\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983018907</updated>\r\n </task>\r\n <task id=\"LOCAL-00003\" summary=\"11.5\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1762333284024</created>\r\n <option name=\"number\" value=\"00003\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00003\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1762333284024</updated>\r\n </task>\r\n <task active=\"true\" id=\"Default\" summary=\"默认任务\">\r\n <changelist id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\" />\r\n <created>1762333567204</created>\r\n <option name=\"number\" value=\"Default\" />\r\n <option name=\"presentableId\" value=\"Default\" />\r\n <updated>1762333567204</updated>\r\n <workItem from=\"1762333568292\" duration=\"691000\" />\r\n <workItem from=\"1762390006167\" duration=\"599000\" />\r\n <workItem from=\"1762421259945\" duration=\"616000\" />\r\n </task>\r\n <option name=\"localTasksCounter\" value=\"4\" />\r\n <servers />\r\n </component>\r\n <component name=\"TypeScriptGeneratedFilesManager\">\r\n <option name=\"version\" value=\"3\" />\r\n </component>\r\n <component name=\"VcsManagerConfiguration\">\r\n <MESSAGE value=\"11.1\" />\r\n <MESSAGE value=\"11.5\" />\r\n <option name=\"LAST_COMMIT_MESSAGE\" value=\"11.5\" />\r\n </component>\r\n</project> |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
|
||||
|
--- a/.idea/workspace.xml (revision c455a0312d16e71a9a58ec4f162e0e7463461374)
|
||||
|
+++ b/.idea/workspace.xml (date 1762514736416)
|
||||
|
@@ -4,7 +4,8 @@
|
||||
|
<option name="autoReloadType" value="SELECTIVE" /> |
||||
|
</component> |
||||
|
<component name="ChangeListManager"> |
||||
|
- <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.5">
|
||||
|
+ <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.6">
|
||||
|
+ <change beforePath="$PROJECT_DIR$/.idea/shelf/___1.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/shelf/___1.xml" afterDir="false" />
|
||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |
||||
|
</list> |
||||
|
<option name="SHOW_DIALOG" value="false" /> |
||||
|
@@ -33,7 +34,7 @@
|
||||
|
"ModuleVcsDetector.initialDetectionPerformed": "true", |
||||
|
"RunOnceActivity.ShowReadmeOnStart": "true", |
||||
|
"RunOnceActivity.git.unshallow": "true", |
||||
|
- "git-widget-placeholder": "sunweining/feature-20251028175924-学习",
|
||||
|
+ "git-widget-placeholder": "dev",
|
||||
|
"last_opened_file_path": "D:/study_dbqb/Dbqb_Study/孙维宁学习笔记", |
||||
|
"node.js.detected.package.eslint": "true", |
||||
|
"node.js.selected.package.eslint": "(autodetect)", |
||||
|
@@ -89,6 +90,7 @@
|
||||
|
<workItem from="1762333568292" duration="691000" /> |
||||
|
<workItem from="1762390006167" duration="599000" /> |
||||
|
<workItem from="1762421259945" duration="616000" /> |
||||
|
+ <workItem from="1762492519774" duration="728000" />
|
||||
|
</task> |
||||
|
<option name="localTasksCounter" value="4" /> |
||||
|
<servers /> |
||||
@ -0,0 +1,17 @@ |
|||||
|
Index: .idea/vcs.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"VcsDirectoryMappings\">\r\n <mapping directory=\"\" vcs=\"Git\" />\r\n </component>\r\n</project> |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
|
||||
|
--- a/.idea/vcs.xml (revision 733ce64c22c664944fe6055b3650e8e75148053a)
|
||||
|
+++ b/.idea/vcs.xml (date 1762514754897)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="VcsDirectoryMappings"> |
||||
|
- <mapping directory="" vcs="Git" />
|
||||
|
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
|
</component> |
||||
|
</project> |
||||
|
\ No newline at end of file |
||||
@ -0,0 +1,54 @@ |
|||||
|
Index: .idea/shelf/___1.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><changelist name=\"在变基之前未提交的更改_[更改]1\" date=\"1762333474424\" recycled=\"true\" deleted=\"true\">\r\n <option name=\"PATH\" value=\"$PROJECT_DIR$/.idea/shelf/在变基之前未提交的更改_[更改]1/shelved.patch\" />\r\n <option name=\"DESCRIPTION\" value=\"在变基之前未提交的更改 [更改]\" />\r\n</changelist> |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/shelf/___1.xml b/.idea/shelf/___1.xml
|
||||
|
--- a/.idea/shelf/___1.xml (revision 733ce64c22c664944fe6055b3650e8e75148053a)
|
||||
|
+++ b/.idea/shelf/___1.xml (date 1762514754907)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
|
-<changelist name="在变基之前未提交的更改_[更改]1" date="1762333474424" recycled="true" deleted="true">
|
||||
|
+<changelist name="在变基之前未提交的更改_[更改]1" date="1762425084937" recycled="false" toDelete="true">
|
||||
|
<option name="PATH" value="$PROJECT_DIR$/.idea/shelf/在变基之前未提交的更改_[更改]1/shelved.patch" /> |
||||
|
<option name="DESCRIPTION" value="在变基之前未提交的更改 [更改]" /> |
||||
|
</changelist> |
||||
|
\ No newline at end of file |
||||
|
Index: .idea/workspace.xml
|
||||
|
IDEA additional info: |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP |
||||
|
<+><?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project version=\"4\">\r\n <component name=\"AutoImportSettings\">\r\n <option name=\"autoReloadType\" value=\"SELECTIVE\" />\r\n </component>\r\n <component name=\"ChangeListManager\">\r\n <list default=\"true\" id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\">\r\n <change beforePath=\"$PROJECT_DIR$/.idea/workspace.xml\" beforeDir=\"false\" afterPath=\"$PROJECT_DIR$/.idea/workspace.xml\" afterDir=\"false\" />\r\n </list>\r\n <option name=\"SHOW_DIALOG\" value=\"false\" />\r\n <option name=\"HIGHLIGHT_CONFLICTS\" value=\"true\" />\r\n <option name=\"HIGHLIGHT_NON_ACTIVE_CHANGELIST\" value=\"false\" />\r\n <option name=\"LAST_RESOLUTION\" value=\"IGNORE\" />\r\n </component>\r\n <component name=\"Git.Settings\">\r\n <option name=\"RECENT_BRANCH_BY_REPOSITORY\">\r\n <map>\r\n <entry key=\"$PROJECT_DIR$\" value=\"dev\" />\r\n </map>\r\n </option>\r\n <option name=\"RECENT_GIT_ROOT_PATH\" value=\"$PROJECT_DIR$\" />\r\n </component>\r\n <component name=\"ProjectColorInfo\">{\r\n "associatedIndex": 0\r\n}</component>\r\n <component name=\"ProjectId\" id=\"353KyGCnYJFbynSTGPtdrLF9Edm\" />\r\n <component name=\"ProjectViewState\">\r\n <option name=\"hideEmptyMiddlePackages\" value=\"true\" />\r\n <option name=\"showLibraryContents\" value=\"true\" />\r\n </component>\r\n <component name=\"PropertiesComponent\"><![CDATA[{\r\n \"keyToString\": {\r\n \"ModuleVcsDetector.initialDetectionPerformed\": \"true\",\r\n \"RunOnceActivity.ShowReadmeOnStart\": \"true\",\r\n \"RunOnceActivity.git.unshallow\": \"true\",\r\n \"git-widget-placeholder\": \"sunweining/feature-20251028175924-学习\",\r\n \"last_opened_file_path\": \"D:/study_dbqb/Dbqb_Study/孙维宁学习笔记\",\r\n \"node.js.detected.package.eslint\": \"true\",\r\n \"node.js.selected.package.eslint\": \"(autodetect)\",\r\n \"node.js.selected.package.tslint\": \"(autodetect)\",\r\n \"nodejs_package_manager_path\": \"npm\",\r\n \"vue.rearranger.settings.migration\": \"true\"\r\n }\r\n}]]></component>\r\n <component name=\"RecentsManager\">\r\n <key name=\"CopyFile.RECENT_KEYS\">\r\n <recent name=\"D:\\study_dbqb\\Dbqb_Study\\孙维宁学习笔记\" />\r\n </key>\r\n </component>\r\n <component name=\"SharedIndexes\">\r\n <attachedChunks>\r\n <set>\r\n <option value=\"bundled-jdk-9823dce3aa75-fbdcb00ec9e3-intellij.indexing.shared.core-IU-251.26927.53\" />\r\n <option value=\"bundled-js-predefined-d6986cc7102b-09060db00ec0-JavaScript-IU-251.26927.53\" />\r\n </set>\r\n </attachedChunks>\r\n </component>\r\n <component name=\"TaskManager\">\r\n <task id=\"LOCAL-00001\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983013107</created>\r\n <option name=\"number\" value=\"00001\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00001\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983013107</updated>\r\n </task>\r\n <task id=\"LOCAL-00002\" summary=\"11.1\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1761983018907</created>\r\n <option name=\"number\" value=\"00002\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00002\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1761983018907</updated>\r\n </task>\r\n <task id=\"LOCAL-00003\" summary=\"11.5\">\r\n <option name=\"closed\" value=\"true\" />\r\n <created>1762333284024</created>\r\n <option name=\"number\" value=\"00003\" />\r\n <option name=\"presentableId\" value=\"LOCAL-00003\" />\r\n <option name=\"project\" value=\"LOCAL\" />\r\n <updated>1762333284024</updated>\r\n </task>\r\n <task active=\"true\" id=\"Default\" summary=\"默认任务\">\r\n <changelist id=\"1250a154-aa13-4278-9e87-904a86c4dbd2\" name=\"更改\" comment=\"11.5\" />\r\n <created>1762333567204</created>\r\n <option name=\"number\" value=\"Default\" />\r\n <option name=\"presentableId\" value=\"Default\" />\r\n <updated>1762333567204</updated>\r\n <workItem from=\"1762333568292\" duration=\"691000\" />\r\n <workItem from=\"1762390006167\" duration=\"599000\" />\r\n <workItem from=\"1762421259945\" duration=\"616000\" />\r\n </task>\r\n <option name=\"localTasksCounter\" value=\"4\" />\r\n <servers />\r\n </component>\r\n <component name=\"TypeScriptGeneratedFilesManager\">\r\n <option name=\"version\" value=\"3\" />\r\n </component>\r\n <component name=\"VcsManagerConfiguration\">\r\n <MESSAGE value=\"11.1\" />\r\n <MESSAGE value=\"11.5\" />\r\n <option name=\"LAST_COMMIT_MESSAGE\" value=\"11.5\" />\r\n </component>\r\n</project> |
||||
|
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP |
||||
|
<+>UTF-8 |
||||
|
===================================================================
|
||||
|
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
|
||||
|
--- a/.idea/workspace.xml (revision 733ce64c22c664944fe6055b3650e8e75148053a)
|
||||
|
+++ b/.idea/workspace.xml (date 1762514754915)
|
||||
|
@@ -4,7 +4,8 @@
|
||||
|
<option name="autoReloadType" value="SELECTIVE" /> |
||||
|
</component> |
||||
|
<component name="ChangeListManager"> |
||||
|
- <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.5">
|
||||
|
+ <list default="true" id="1250a154-aa13-4278-9e87-904a86c4dbd2" name="更改" comment="11.6">
|
||||
|
+ <change beforePath="$PROJECT_DIR$/.idea/shelf/___1.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/shelf/___1.xml" afterDir="false" />
|
||||
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> |
||||
|
</list> |
||||
|
<option name="SHOW_DIALOG" value="false" /> |
||||
|
@@ -33,7 +34,7 @@
|
||||
|
"ModuleVcsDetector.initialDetectionPerformed": "true", |
||||
|
"RunOnceActivity.ShowReadmeOnStart": "true", |
||||
|
"RunOnceActivity.git.unshallow": "true", |
||||
|
- "git-widget-placeholder": "sunweining/feature-20251028175924-学习",
|
||||
|
+ "git-widget-placeholder": "dev",
|
||||
|
"last_opened_file_path": "D:/study_dbqb/Dbqb_Study/孙维宁学习笔记", |
||||
|
"node.js.detected.package.eslint": "true", |
||||
|
"node.js.selected.package.eslint": "(autodetect)", |
||||
|
@@ -89,6 +90,7 @@
|
||||
|
<workItem from="1762333568292" duration="691000" /> |
||||
|
<workItem from="1762390006167" duration="599000" /> |
||||
|
<workItem from="1762421259945" duration="616000" /> |
||||
|
+ <workItem from="1762492519774" duration="728000" />
|
||||
|
</task> |
||||
|
<option name="localTasksCounter" value="4" /> |
||||
|
<servers /> |
||||
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project version="4"> |
||||
|
<component name="VcsDirectoryMappings"> |
||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" /> |
||||
|
</component> |
||||
|
</project> |
||||
@ -0,0 +1,314 @@ |
|||||
|
## SpringBoot |
||||
|
注:下面的版本号1.0,2.0等等仅代表发展历程演变,不代表该技术真实发布版本号 |
||||
|
### web开发初级阶段: |
||||
|
servlet+jsp web开发的初级阶段。mvc三层架构 m:model v:view c:controller |
||||
|
### web开发推进发展1.0 |
||||
|
之后同一时期出现三种: |
||||
|
SSH |
||||
|
struct 1.0 起初解决mvc 扩展名为.do的网站 |
||||
|
spring 1.0 起初专注于创建对象。单例对象。 |
||||
|
hibernate 1.0 :orm关系映射。将数据库中的结果集转换为Java对象,无需自己写sql。 |
||||
|
### web开发推进发展2.0 |
||||
|
之后发展: |
||||
|
SSH2 |
||||
|
struct 2.0 .action扩展名 |
||||
|
spring 2.0 加入aop功能,面向切面功能 |
||||
|
mybaits:orm 轻量级,需要程序员自己写sql |
||||
|
hibernate 2.0+ |
||||
|
### web开发推进发展3.0 |
||||
|
SSM |
||||
|
需要使用xml进行配置 |
||||
|
springMVC:解决MVC,替代struct2.0 |
||||
|
Spring 3.0+ 增加更多功能,模块化 |
||||
|
mybaits 3.0+ 替代hibernate |
||||
|
|
||||
|
微服务:把一个大项目拆分成小的项目,然后根据需要进行整合。(例如:微信上面的小程序)规模小 |
||||
|
SpringBoot 不是一个框架。一个快速开发脚手架。快速开发,在一定程度上限制了自由性,有固定的目录结构,有约定俗成的配置。 |
||||
|
|
||||
|
> 约定大于配置 |
||||
|
|
||||
|
SpringBoot != SSM |
||||
|
SpringBoot整合SSM |
||||
|
|
||||
|
|
||||
|
### idea配置一个springboot项目: |
||||
|
 |
||||
|
 |
||||
|
|
||||
|
 |
||||
|
根包:com.ysy |
||||
|
主启动类 |
||||
|
|
||||
|
以spring- boot-start开头的依赖是启动器,自动配置 |
||||
|
|
||||
|
### Spring框架的两项核心功能 |
||||
|
#### 一. 控制反转 |
||||
|
Spring:将创建对象的权限交给spring框架,称之为控制反转 Inverse Of Control 简称ioc |
||||
|
|
||||
|
> IOC概念理解如下图,借鉴自:https://blog.csdn.net/bestone0213/article/details/47424255?fromshare=blogdetail&sharetype=blogdetail&sharerId=47424255&sharerefer=PC&sharesource=ysy1648067239&sharefrom=from_link |
||||
|
>  |
||||
|
|
||||
|
#### 二. 依赖注入 |
||||
|
Spring框架自动将容器中的实例,自动赋值给需要的类,DI |
||||
|
Autowired: 依赖注入注解 |
||||
|
##### 2.1依赖注入的三种方式: |
||||
|
###### 2.1.1字段注入 |
||||
|
```java |
||||
|
@Autowired |
||||
|
private StudentService studentService ; |
||||
|
``` |
||||
|
###### 2.1.2setter注入 |
||||
|
```java |
||||
|
@Autowired |
||||
|
public void setStudentService(StudentService studentService) { |
||||
|
this.studentService = studentService; |
||||
|
} |
||||
|
``` |
||||
|
###### 2.1.3 构造器注入 |
||||
|
构造器注入可以省略Autowired注解 |
||||
|
```java |
||||
|
@Autowired //构造器注入可以省略此行注解 |
||||
|
public StudentController(StudentService studentService){ |
||||
|
this.studentService= studentService; |
||||
|
} |
||||
|
|
||||
|
``` |
||||
|
#### 2.2 依赖注入相关注解解释: |
||||
|
##### 2.2.1 @Autowired |
||||
|
1.默认按类型匹配 使用频率比较高 |
||||
|
|
||||
|
``` |
||||
|
@Autowired |
||||
|
private StudentService studentService; |
||||
|
``` |
||||
|
就会去容器里去找StudentService类型的实例去匹配,此时不加其他注解的前提下,容器里只能有一个该类型的实例,否则注解就不知道该去找哪个实例。 |
||||
|
|
||||
|
**当有多个匹配时** |
||||
|
1.可以使用@Primary注解表示优先 |
||||
|
|
||||
|
> 比如StudentServiceImpl和MyStudentServiceImpl两个类均实现StudentService接口进行实例化,那么,@Primary加在哪个类上,哪个类优先级就高,@Autowired就会优先去找这个类 |
||||
|
|
||||
|
2.按名称匹配 |
||||
|
|
||||
|
> 首先,@Component变成@Component("i1"),也就是括号里加上名字,(@Component注解不加括号写名字时,默认的名字是@Component下类名的首字母小写) |
||||
|
> 然后,cotroller层需要搭配 @Qualifier()注解,加上 @Qualifier(“i1”)。此时, |
||||
|
> @Autowired注解就会找 @Qualifier(“i1”)指定的@Component("i1")所在的类实例化 |
||||
|
|
||||
|
##### 2.2.2@Resource注解: |
||||
|
功能类似于 Spring 的 @Autowired 注解,也是用于依赖注入,默认是按名称进行装配(byName),如果找不到匹配的名称,则按类型装配(byType) |
||||
|
1.默认按名称匹配注入 按name值 |
||||
|
``` |
||||
|
@Resource(name = "i1") |
||||
|
``` |
||||
|
2.按类型匹配注入:通过type属性 |
||||
|
|
||||
|
``` |
||||
|
@Resource(type = StudentService.class) |
||||
|
``` |
||||
|
3.上面两个结合使用: |
||||
|
``` |
||||
|
@Resource(type = StudentService.class,name = "i1") |
||||
|
``` |
||||
|
##### 2.2.3 @Component注解的变种 |
||||
|
首先回顾@Component注解的作用: |
||||
|
> 当一个类被标记为 @Component 时,Spring 容器会在启动时自动扫描并实例化这个类,并将其注册到 Spring 上下文中 |
||||
|
> @Component 注解可以用于任何类,包括控制器、服务、DAO 等。当一个类被标记为 @Component 时,它就成为了 Spring 上下文中的一个 bean,可以被其他 bean 通过依赖注入的方式使用。 |
||||
|
|
||||
|
该注解的“变种”: |
||||
|
> spring官方认为@Component注解过于中性,不易理解,所以引入了以下几种进行区分 |
||||
|
|
||||
|
@Service 用于标注业务层组件 |
||||
|
@Repository (仓储)用于标注数据访问组件,即DAO组件 |
||||
|
@Controller 用于标注控制层组件 |
||||
|
@RestController 本质上是 @Controller + @ResponseBody,因此无需每个方法都添加 @ResponseBody,简化了开发。除了具有@controller的功能之外,还会实现@ResponseBody ,也就是声明返回值 |
||||
|
|
||||
|
|
||||
|
> @Component 和@Service,@Repository (仓储),@Controller |
||||
|
> ,@RestController一样,自动创建唯一实例 ,在目前的 Spring 版本中,这 3 个注释和 @Component 是等效的,但是从注释类的命名上,很容易看出这 3 个注释分别和持久层、业务层和控制层(Web 层)相对应。 |
||||
|
> 虽然目前这3 个注释和 @Component 相比没有什么新意,但 Spring 可能将在以后的版本中为它们添加特殊的功能。 |
||||
|
##### @Component与@Bean的区别和联系 |
||||
|
@Component 作用于类,@Bean作用于方法。 |
||||
|
@Bean 需要在配置类中使用,即类上需要加上@Configuration注解 |
||||
|
 |
||||
|
|
||||
|
相同点:两者的目的是一样的,都是注册bean到Spring容器中。 |
||||
|
两者都可以通过@Autowired装配 |
||||
|
##### 有@Component为何还需要@Bean呢? |
||||
|
如果你想要将第三方库中的组件装配到你的应用中,在这种情况下,是没有办法在它的类上添加@Component注解的,因此就不能使用自动化装配的方案了,但是我们可以使用@Bean,就像上图那种方法。 |
||||
|
|
||||
|
#### 各种@xxxMapping注解 |
||||
|
|
||||
|
在Controller中,一个方法只有指定@XXXMapping才能接收并处理请求 |
||||
|
|
||||
|
1.@GetMapping:接收get类型的请求 |
||||
|
```java |
||||
|
@GetMapping(value = "/student/list",produces = |
||||
|
"application/json;charset=utf-8") |
||||
|
//produces是指定数据类型 |
||||
|
``` |
||||
|
2.@PostMapping接收post类型的请求 |
||||
|
3.@PutMapping接收put类型的请求 |
||||
|
4.@PatchMapping接收patch类型的请求 |
||||
|
5.@DeleteMapping接收delete类型的请求 |
||||
|
|
||||
|
6.@RequestMapping 是一个通用的注解,接收任意类型的请求,但可以指定类型,produces属性指定响应类型,这是最早的注解,后来为了方便使用,根据HTTP方法细分出了上述的专用注解。 |
||||
|
|
||||
|
```java |
||||
|
@RequestMapping(value = "/student/list",method ={ |
||||
|
RequestMethod.GET,RequestMethod.POST}) |
||||
|
|
||||
|
``` |
||||
|
> 这些@xxxMapping也可以添加到类上。表示所有方法以类上定义的路径作为公共的前缀。全局统一定义 |
||||
|
> |
||||
|
|
||||
|
### SpringMvc 方法的参数类型 |
||||
|
|
||||
|
> 这里说的SpringMvc 方法一般就是指在controller层里,被各种@xxxMapping注解修饰的方法,比如查询所有学生方法,删除学生信息方法 |
||||
|
|
||||
|
1.可以是HttpServletRequest,HttpServletResponse,HttpSession |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map, |
||||
|
HttpServletRequest request) { |
||||
|
|
||||
|
``` |
||||
|
2.可以是基本数据类型,以及包装类,BigDecimal,BigInteger,String,用于接收请求中的参数 |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map,int pages,int limit ,String order) { |
||||
|
``` |
||||
|
|
||||
|
如果前端url里写的sort=id,但后端就是想用order接收,那么 |
||||
|
搭配@RequestParam ,@PathVariable注解 |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map, |
||||
|
int pages,int limit , |
||||
|
@RequestParam("sort") String order) { |
||||
|
``` |
||||
|
|
||||
|
> @RequestParam("sort")还可以加默认值,也就是@RequestParam("sort",defaultValue ="name") |
||||
|
|
||||
|
```java |
||||
|
@GetMapping(value = "/list/{limit}",produces = MediaType.TEXT_HTML_VALUE) |
||||
|
public String list(Map<String, Object> map, |
||||
|
int pages, |
||||
|
@PathVariable Integer limit , |
||||
|
@RequestParam("sort") String order) { |
||||
|
``` |
||||
|
|
||||
|
 |
||||
|
|
||||
|
> url里list/后写15,此时的15会直接赋给带有 @PathVariable注解且名字为limit的变量 |
||||
|
|
||||
|
```java |
||||
|
@GetMapping(value = "/list/{a1}",produces = MediaType.TEXT_HTML_VALUE) |
||||
|
public String list(Map<String, Object> map, |
||||
|
int pages, |
||||
|
@PathVariable("a1") Integer limit , |
||||
|
@RequestParam("sort") String order) { |
||||
|
``` |
||||
|
|
||||
|
> @PathVariable也可以指定名字,如 @PathVariable("a1") |
||||
|
```java |
||||
|
@GetMapping(value ={"/list/{a1}","/list"},produces = MediaType.TEXT_HTML_VALUE) |
||||
|
public String list(Map<String, Object> map, |
||||
|
int pages, |
||||
|
@PathVariable("a1") Integer limit , |
||||
|
@RequestParam("sort") String order) { |
||||
|
``` |
||||
|
> 如果加上required = false,也就是 @PathVariable("a1",required = |
||||
|
> false)代表url里list/后可以不写{a1} |
||||
|
|
||||
|
3.JavaBean 普通类将请求参数通过反射,设置到javabean实例中 |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map, |
||||
|
Student student) { |
||||
|
``` |
||||
|
 |
||||
|
 |
||||
|
|
||||
|
|
||||
|
4.Map,Model,ModelMap:充当请求域,map最常用 |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map, |
||||
|
Model model,ModelMap modelMap ) { |
||||
|
List<Student> students = studentService.findAll(); |
||||
|
map.put("students", students); |
||||
|
model.addAttribute("students",students); |
||||
|
|
||||
|
modelMap.addAttribute("modelMap",students); |
||||
|
modelMap.put("students",students); |
||||
|
|
||||
|
|
||||
|
``` |
||||
|
|
||||
|
5.加了@RequestParam的map不再作为请求域而是用于存储请求参数 |
||||
|
|
||||
|
```java |
||||
|
public String list(Map<String, Object> map, |
||||
|
@RequestParam Map<String, Object> map1 ) { |
||||
|
System.out.println(map1); |
||||
|
``` |
||||
|
 |
||||
|
 |
||||
|
|
||||
|
以上五种参数任意组合 |
||||
|
|
||||
|
### SpringMvc 方法的返回值 |
||||
|
1.字符串且响应内容类型为text/html,返回值即模板文件名 |
||||
|
比如: |
||||
|
```java |
||||
|
//请求转发 |
||||
|
return "/student/list"; |
||||
|
``` |
||||
|
|
||||
|
2.在满足1的基础上,返回"forword:/xxx"表示请求转发 |
||||
|
|
||||
|
```java |
||||
|
return "forward:/student/list"; |
||||
|
``` |
||||
|
|
||||
|
3.在满足1的基础上,返回“redirect:/xxx”表示重定向 |
||||
|
|
||||
|
```java |
||||
|
return "redirect:/student/list"; |
||||
|
``` |
||||
|
|
||||
|
4.ModelAndView:既可以指定视图名称,同时可以当请求域使用,前三种本质上也会被包装成ModelAndView |
||||
|
|
||||
|
```java |
||||
|
@GetMapping("/to_list") |
||||
|
public ModelAndView toList(){ |
||||
|
|
||||
|
ModelAndView mav = new ModelAndView("student/list");//做视图 |
||||
|
mav.addObject("students",studentService.findAll());//做模型 |
||||
|
return mav; |
||||
|
|
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
5.如果指定了响应内容类型为json,并且添加了@ResponseBody注解,无论返回值什么类型,都会序列化成json字符串 |
||||
|
|
||||
|
```java |
||||
|
//响应json内容 |
||||
|
@GetMapping(value = "/student/list_json",produces = MediaType.APPLICATION_JSON_VALUE) |
||||
|
@ResponseBody |
||||
|
public ResponseEntity<List<Student>> list(){ |
||||
|
return "student/list" |
||||
|
} |
||||
|
``` |
||||
|
|
||||
|
6.返回ResponseEntity类型。仅限于响应json格式,同时封装了业务数据以及状态码 |
||||
|
|
||||
|
```java |
||||
|
//响应json内容 |
||||
|
@GetMapping(value = "/student/list_json",produces = MediaType.APPLICATION_JSON_VALUE) |
||||
|
@ResponseBody |
||||
|
public ResponseEntity<List<Student>> list(){ |
||||
|
List<Student> students = studentService.findAll(); |
||||
|
return ResponseEntity.status(200).body(students); |
||||
|
} |
||||
|
``` |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue