当前位置:网站首页 > R语言数据分析 > 正文

ueditor官网文档(ueditor formdesign)



Spring Boot provides auto-configuration for Spring MVC that works well with most applications.(大多场景我们都无需自定义配置)

The auto-configuration adds the following features on top of Spring’s defaults:

  • Inclusion of and beans.
  • 内容协商视图解析器和BeanName视图解析器
  • Support for serving static resources, including support for WebJars (covered later in this document)).
  • 静态资源(包括webjars)
  • Automatic registration of , , and beans.
  • 自动注册
  • Support for (covered later in this document).
  • 支持 (后来我们配合内容协商理解原理
  • Automatic registration of (covered later in this document).
  • 自动注册 (国际化用)
  • Static support.
  • 静态index.html 页支持
  • Custom support (covered later in this document).
  • 自定义
  • Automatic use of a bean (covered later in this document).
  • 自动使用 ,(DataBinder负责将请求数据绑定到JavaBean上)

If you want to keep those Spring Boot MVC customizations and make more MVC customizations (interceptors, formatters, view controllers, and other features), you can add your own class of type but without .

不用@EnableWebMvc注解。使用 + 自定义规则

If you want to provide custom instances of , , or , and still keep the Spring Boot MVC customizations, you can declare a bean of type and use it to provide custom instances of those components.

声明 改变默认底层组件

If you want to take complete control of Spring MVC, you can add your own annotated with , or alternatively add your own -annotated as described in the Javadoc of .

使用

静态资源访问

静态资源目录

只要静态资源放在类路径下: called (or or or

访问的路径为 : 当前项目根路径/ + 静态资源名

原理: 静态映射/。

请求进来,先去找Controller看能不能处理。不能处理的所有请求又都交给静态资源处理器。静态资源也找不到则响应404页面

改变默认的静态资源路径(静态资源访问添加前缀)

静态资源访问前缀

默认无前缀

当前项目 + static-path-pattern + 静态资源名 = 静态资源文件夹下找(localhost:8080/res/静态资源)

webjar(使用较少可以用来引入静态资源)

自动映射 /webjars/

https://www.webjars.org/

访问地址:http://localhost:8080/webjars/jquery/3.5.1/jquery.js 后面地址要按照依赖里面的包路径

欢迎页的支持

springboot支持

  • 静态资源路径下 index.html
  • 可以配置静态资源路径
  • 但是不可以配置静态资源的访问前缀。否则导致 index.html不能被默认访问
  • controller能处理/index

favicon.ico 放在静态资源目录下即可。

  • SpringBoot启动默认加载 xxxAutoConfiguration 类(自动配置类)
  • SpringMVC功能的自动配置类 WebMvcAutoConfiguration,生效
    [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-51xQ9VYF-62)(C:UsersLenovoAppDataRoamingTypora ypora-user-imagesimage-054823.png)]

  • 给容器中配置了什么
  • 配置文件的相关属性和xxx进行了绑定。WebMvcProperties==spring.mvc、ResourceProperties==spring.resources
配置类只有一个有参构造器
资源处理的默认规则

下面的源码为默认的静态资源的4个路径

欢迎页的处理规则

springboot 请求参数处理

请求映射

rest使用与原理

  • @xxxMapping;
  • Rest风格支持(使用HTTP请求方式动词来表示对资源的操作
  • 以前:/getUser 获取用户 /deleteUser 删除用户 /editUser 修改用户 /saveUser 保存用户
  • 现在: /user *GET-*获取用户 *DELETE-*删除用户 *PUT-*修改用户 *POST-*保存用户
  • 核心Filter;HiddenHttpMethodFilter
  • 用法: 表单method=post,隐藏域 _method=put
  • SpringBoot中手动开启
  • 扩展:如何把_method 这个名字换成我们自己喜欢的。
到此这篇ueditor官网文档(ueditor formdesign)的文章就介绍到这了,更多相关内容请继续浏览下面的相关推荐文章,希望大家都能在编程的领域有一番成就!

版权声明


相关文章:

  • orcale 时间查询(orcal查询日期)2025-11-17 23:36:10
  • 如何查看yarn日志(查看yarn日志命令)2025-11-17 23:36:10
  • jazzhiphop女rapper(jazzhiphop女rapper AV)2025-11-17 23:36:10
  • nrm不是内部或外部命令(npm不是内部或外部)2025-11-17 23:36:10
  • treesoft官网(treesoft官网下载)2025-11-17 23:36:10
  • phraise是什么意思(pharisee什么意思)2025-11-17 23:36:10
  • entrust安卓(not tetris安卓)2025-11-17 23:36:10
  • 查看docker版本信息的命令是(查看docker版本信息的命令是多少)2025-11-17 23:36:10
  • score(score翻译)2025-11-17 23:36:10
  • netter怎么读(onternet怎么读)2025-11-17 23:36:10
  • 全屏图片