
SpringBoot
springboot
C_Observer
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SpringBoot项目加载Java目录下的xml文件
1.配置pom文件<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins>原创 2021-03-05 19:45:02 · 580 阅读 · 2 评论 -
Springboot错误处理机制
浏览器访问不存在资源效果原创 2020-03-28 00:18:14 · 280 阅读 · 0 评论 -
SpringSecurity
Spring Security 是针对Spring项目的安全框架,也是Spring Boot底层安全模块默认的技术选型,他可以实现强大的Web安全控制,对于安全控制,我们仅需要引入spring-boot-starter-security模块,进行少量的配置,即可实现强大的安全管理!WebSecurityConfigurerAdapter:自定义Security策略 Authenticat...原创 2020-04-18 18:15:06 · 321 阅读 · 0 评论 -
Swagger使用说明
SpringBoot集成Swagger1、创建一个SpringBoot工程,引入两个依赖 <!-- https://mvnrepository.com/artifact/io.springfox/springfox-swagger2 --> <dependency> <groupId>io.s...原创 2020-05-07 21:37:49 · 918 阅读 · 0 评论 -
Springboot缓存
缓存缓存是每一个系统都应该考虑的功能,它用于加速系统的访问,以及提速系统的性能。如:经常访问的高频热点数据:电商网站的商品信息:每次查询数据库耗时,可以引入缓存 微博阅读量、热点话题等Springboot整合缓存Spring从3.1后定义了 org.springframework.cache.CacheManager 和 org.springframework.cache.Cac...原创 2020-04-03 11:28:56 · 239 阅读 · 0 评论 -
Springboot异步任务和定时任务
Springboot异步任务在项目开发中,绝大多数情况下都是通过同步方式处理业务逻辑的,但是比如批量处理数据,批量发送邮件,批量发送短信等操作 容易造成阻塞的情况,之前大部分都是使用多线程来完成此类任务。而在Spring 3+之后,就已经内置了 @Async 注解来完美解决这个问题,从而提高效率使用的注解: @EnableAysnc:启动类上开启基于注解的异步任务 @Ays...原创 2020-04-02 11:50:57 · 395 阅读 · 0 评论 -
Springboot使用外置Servlet容器
嵌入式与外置Servlet容器比较:嵌入式Servlet容器:运行启动类就可启动,或将项目打成可执行的jar包 优点:简单、快捷 缺点:默认不支持JSP、优化定制比较复杂使用定制器, 还需要知道 每个功能 的底层原理 外置Servlet容器:配置 Tomcat, 将项目部署到Tomcat中运行使用外置Servlet容器操作步骤:1.创建一个war项目2.指定webap...原创 2020-03-28 22:01:43 · 220 阅读 · 0 评论 -
Springboot嵌入式Servlet容器自定义配置
注册Servlet三大组件Servlet/Filter/Listener原创 2020-03-28 11:21:13 · 294 阅读 · 0 评论 -
Springboot连接操作数据库
整合JDBC相关配置pom.xml配置 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> ...原创 2020-03-27 09:05:16 · 763 阅读 · 0 评论 -
Thymeleaf模板引擎
Thymeleaf模板引擎Spring Boot 官方不推荐使用JSP,因为内嵌的 Tomcat 、Jetty 容器不支持以 jar 形式运行 JSP。Spring Boot 中提供了大量模板引擎,包含 Freemarker、Mastache、Thymeleaf 等。 而 Spring Boot 官方推荐使用 Thymeleaf 作为模板引擎, 因为 Thymeleaf 提供了完美的 Spri...原创 2020-03-23 10:16:57 · 269 阅读 · 0 评论 -
SpringBoot核心配置和日志
SpringBoot的配置文件Spring Boot 使用一个全局配置文件,放置在 src/main/resources 目录或类路径的 /config下 application.properties application.yml 配置文件的作用:修改 Spring Boot 自动配置的默认值YAML基本语法key: value 表示一对键值对(冒号后面必须要有空格) ...原创 2020-03-21 10:21:59 · 664 阅读 · 2 评论 -
SpringBoot快速入门
1.创建maven工程使用idea工具创建一个maven工程,该工程为普通的java工程即可2.添加SpringBoot起步依赖SpringBoot要求,项目要继承SpringBoot的起步依赖spring-boot-starter-parent<parent> <groupId>org.springframework.boot<...原创 2020-01-19 11:12:28 · 198 阅读 · 0 评论