[0]Spring Boot+Vue全栈开发实战.学习笔记

目录

  • Spring Boot 入门 .. .... .. ... .. .. …. ....... .. ....………......….. ... .. …..... ... .……… .... .. 1 1.1 Spring Boot 简介............... ...... .. .. …. ... .........………… .. .. ….. .... ......... ..… ...... .….. 1 1.2 开发第一个 Spring Boot 程序….. ... .. ... ....…… .... ... …· ··· ·· ··· ··· ···· ··· …. .. ....….............. 2 1.2.1 创建 Maven 工程... ........ ..... .. .. ..... ……………………………………… …................... 2 1.2.2 项目构建······…… ……………........…...... ..... .... ..… …………….. …................... 5 1.2.3 项目启动........ ....…................…....... ……………··….... ...….......... .… .. ...... ...... 7 1.3 Spring Boot 的简便创建方式..... ..... .. ....... ... .. ..... ...... .. .. .. .... ............. .... .................. ........ 8 1.3.1 在线创建.......……… ·· ····………· ···········…….......…....... .... ... .. .……. .. ... …........ ... 8 1.3.2 使用 IntelliJ IDEA 创建· ·· ···· ···· ·······…… .....…… …........................ ............ 9 1.3.3 千史用 STS 创建............ ..... ............................................. .. ... ................ ................... 11 1.4 小结..........…………·········……………………… ……… ……………........ …........ .... .... .. 12 Spring Boot 基础配置....…… ·· ····· ·· ·· ·…... .. …. .. .. …··· ·· ··· ·· ·· ····…... .. ……... 13 2.1 不使用 spn吨,boot sta -parent.. .. .....… ·········………......…………·························…......... 13 2.2 @Spring BootApplication.…………………...............………............ ...…..... .. ..….................. 14 2.3 定制 banner. ………........……… …….... ...… .............………. .. …….... .. ..… .. ............ .. 16 2.4 Web 容器配 ... .... ..... .. .… ·…….. ...…··· ·· ····· ·· …. .. ............ .. .. .. .... ... .. ....…......... 17 2.4.1 Tomcat 配直·······················……… ………………… ..... …. .. ...…….................... 17 2.4.2 Je町配置..................…………· ·· ·· ·… ……··· ···· ……… …………....... 20 2.4.3 Undertow 配直........... …........ ........ ... .. ......... .. .... .. .. ..... .... .. .. .... ....... .. ... .. .. .. ..... 21 2.5 Properties 配置....... ..………………··…... ....… ·· ·· …..... ........................ .. .... ... ... .... ... ...... .. 21 2.6 类型安全配置属性.. ..... .... ....... .…···· ·· ····…………………… ………… .... .. 22 2.7 YAML 置...... .……………………········ ··· ·····…… ···· ····…… .......... .... .. .............. .. .. .. ... ..... 24 2.7.1 常规配置............................. ... .. .….. .. .. .......... ... ....... ... ........... ......................... 24 2.7 2 复杂配直........... ...................... .……..... ……………………………................ 25 2.8 Profile .......…………….. ...............…........……………….........…….......…........…....................... 26 2.9 小结....... .. .. .. ... ......... ... …......... ......................................... ............. ... ... .. .. ........... 27 Spring Boot 整合视图层技术. .. .. .. .. .. ...... .. ........ ..………………................. 28 3.1 整合 Thymeleaf ..….....................……······…......... ... .................………………….................... 28 3.2 整合 FreeMarker .........………........…… ……·········…·········…........……········…................. 31 仅供非商业用途或交流学习使用 仅供非商业用途或交流学习使用 IV I Spring Boot+Vue 全措开发实战 3.3 小结......…………···· ····· ···· ··· ···· ····· ·· ·… ........ .... ...... .. .. .. .... .. ........... ... ............................ 33 Spring Boot 整合 Web 开发················· ··········· ··········· ··· ·············· ······ ·· ·· ······ ··· ·…........ 34 4.1 返回 JSON 数据 ......... ................. ....... .. ........…...............………......................... ........ .. 34 4.1.l 默认实现..........… ...... ............... ...... ... ... .. ... ............. ... ........ ... ................................. 34 4.1.2 自定义转换器....... .. .. .... …···· ·· ···· ··· ·…......... ... .. .. .. .............. ....... ..... ... .. ..….. ....... 36 4.2 静态资源访问............... ... ... .. .. .... ... ... ..…… ... .. ...…. ....… ....... ............ ... .............. 40 4.2.1 默认策略········ ·· ·· ….......……. .. .. .…··…... .....…......................... .... ........... .......... 40 4.2.2 自定义策略..........…... .. .. ……·······…·· …........ ... ......... ..…... ... .. .... .. ... ..... .. .... .. .... 42 4.3 文件上传... .... ..… .. ....…. ·······….........…........................................................................... 42 4.3.1 单文件上传. .. .. .. ....….... .............…..... ..……. ....……........................….......…......... 43 4.3.2 多文件上传.................……… .. ...... .…. .. ....…... ......................... ............... ........... ..... 45 4.4 @ControllerAdvice .........….........….................…….........…........…………………….......... 46 4.4.1 全局异常处理....... ............ ... ................ .... .... .. ... ....... ..... ............. ..... ...... ...... ... 46 4.4.2 添加全局数据 .. ........ ... …… .. .. .. ........ .............. .... ........ ..... ....... ......... ... .. .. ....... 48 4.4.3 请求参数预处理....................... ... .. ....…..... ..… ····· ············ ··· ···· ……............... 48 4.5 自定义错误页….......………………… ... ..... ... ..... ....... ...... .......... ... ............. ... ..... ... ... ... .. 50 4.5.1 简单配直 ... ... ......………………………………………………………………………………….. ..... 52 4.5.2 复杂配直........... .. .... .. ... ..... .. .. ... ..... .... .. .… .......…........ .. .. ....... .......... ... ... .. .... 55 4 6 CORS 支持············….........……

你可能感兴趣的:(全栈开发,springboot,intellij-idea,spring,boot,spring,vue.js)