• Java web Springboot


    1.Spring boot  阅读源码:需要看 1 和  2两项内容。

         ⒈. XXXAutoConfiguration :获取自动xxx的配置类

      ⒉.XXXProperties:自动配置类装配配置文件中自定义的内容

        ⒊. 导入静态资源:webMvcAutoConfiguration   webMvcAutoConfigurationAdapter     webMvcProperties    addResourceHandler

          可以放置静态资源的几个位置:

          1.classpath指springboot工程src目录下的resource目录:

          2.路径:maven:   /webjars/**

          3.classpath:/META-INF/resources/ ; classpath:/resources/;   classpath:/public/;   classpath:/static/;     优先级: resource>static>public

                          4.templates目录下所有页面html,只能通过对应的controller访问;通过thymeleaf模板引擎访问;

                         

               

                           

         4.首页    

          1.http://localhost:8080/   访问/首页 顺序:(静态资源访问顺序)              

                                           1.  resources/META-INF/resources/index.html   

                                           2.  resources/resource/index.html   

                                           3.  resources/static/index.html     

                                           4.  resources/public/index.html

         2.favicon:  <link rel="shortcut icon" href="/favicon.ico"/>    /resources/** 静态文件夹底下加图片favicon.ico

            

       5.JSP 模板引擎thymeleaf  :<html xmlns:th="http://www.thymeleaf.org">  

             1./resources/templates/*.html 下的所有html页面,都有thymeleaf引擎模板接管。
    2.thymeleaf语法规则:th:元素名
          读取model.addAttribute(key,value)====>th:text="${xx}"
    读取model.addAttribute(key,"html代码块") th:utext="${代码块}"不转义
    读取model.addAttribute(keys,Arrays.asList("语文","数学")) 循环结构读取: th:each="key:${keys}" th:text="${key} [[${key}]]
            URL @{}
              if then if ? then
         3.thymeleaf Properties配置:访问 前缀:/resources/templates/; 后缀: *.html;

       6.装配扩展SpringMVC:

       7.增删改查

       8.拦截器

       9.国际化

  • 相关阅读:
    C语言-结构体内存对齐
    Wireshark-配合tcpdump对Android(安卓)手机抓包
    Python-技巧
    矩阵白化
    非负矩阵分解(3):拉格朗日乘子法求解
    非负矩阵分解(2):算法推导与实现
    非负矩阵分解(1):准则函数及KL散度
    自适应滤波:递归最小二乘
    自适应滤波:最小二乘法
    自适应滤波:奇异值分解SVD
  • 原文地址:https://www.cnblogs.com/chencn/p/12241560.html
Copyright © 2020-2023  润新知