随笔分类 -  Spring Boot

摘要:1.依赖引入 <!-- 引入swagger --> <dependency> <groupId>org.springdoc</groupId> <artifactId>springdoc-openapi-ui</artifactId> <version>1.7.0</version> </depen 阅读全文
posted @ 2024-05-10 13:38 无涯子wyz 阅读(249) 评论(0) 推荐(0) 编辑
摘要:我们先来看一个注解:@Configuration,该注解的源码其实也非常简单 @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @Documented @Component public @interface Configur 阅读全文
posted @ 2022-04-26 16:52 无涯子wyz 阅读(187) 评论(0) 推荐(0) 编辑
摘要:1.请求映射处理 Rest风格的请求,使用HTTP请求方式动词来表示对资源的操作。核心Filter,就是这个HiddenHttpMethodFilter。在SpringBoot中默认情况下表单的Rest风格默认没有开启 @Bean @ConditionalOnMissingBean(HiddenHt 阅读全文
posted @ 2022-04-25 17:26 无涯子wyz 阅读(75) 评论(0) 推荐(0) 编辑
摘要:静态资源访问 静态资源只要放到类路径下:/static,/public,/resources,/MATE-INF/resources目录下,我们访问静态资源的时候就不需要加路径,直接在默认的根目录就可以访问。 默认的访问策略:如果访问的路径Controller可以处理,那么就会使用Controlle 阅读全文
posted @ 2022-04-24 23:37 无涯子wyz 阅读(592) 评论(0) 推荐(0) 编辑
摘要:了解SpringBoot自动配置原理 依赖管理 首先我们在创建SpringBoot项目的时候一般都会引入一个父项目 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent< 阅读全文
posted @ 2022-04-24 13:19 无涯子wyz 阅读(1145) 评论(0) 推荐(0) 编辑
摘要:Spring与SpringBoot 官方网站:www.spring.io SpringBoot优点 Create stand-alone Spring applications 创建独立Spring应用 Embed Tomcat, Jetty or Undertow directly (no nee 阅读全文
posted @ 2022-04-23 18:04 无涯子wyz 阅读(38) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示