上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页
摘要: SpringBoot整合Shiro 1.shiro是什么? Shiro是Apache下的一个开源项目。shiro属于轻量级框架,相对于SpringSecurity简单的多,也没有SpringSecurity那么复杂。 2.主要功能 shiro主要有三大功能模块: Subject:主体,一般指用户。 阅读全文
posted @ 2020-07-07 18:23 Maple_XL 阅读(299) 评论(0) 推荐(0) 编辑
摘要: SpringBoot整合SpringSecurity 1. 认识SpringSecurity Spring Security 是针对Spring项目的安全框架,也是Spring Boot底层安全模块默认的技术选型,他可以实现强大的Web安全控制,对于安全控制,我们仅需要引入spring-boot-s 阅读全文
posted @ 2020-07-07 18:18 Maple_XL 阅读(768) 评论(0) 推荐(0) 编辑
摘要: 自定义starter starter: ​ 1、这个场景需要使用到的依赖是什么? ​ 2、如何编写自动配置 @Configuration //指定这个类是一个配置类 @ConditionalOnXXX //在指定条件成立的情况下自动配置类生效 @AutoConfigureAfter //指定自动配置 阅读全文
posted @ 2020-07-07 18:16 Maple_XL 阅读(160) 评论(0) 推荐(0) 编辑
摘要: SpringBoot与数据访问 1、JDBC <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <depen 阅读全文
posted @ 2020-07-07 18:15 Maple_XL 阅读(418) 评论(0) 推荐(0) 编辑
摘要: 配置嵌入式Servlet容器 SpringBoot默认使用Tomcat作为嵌入式的Servlet容器; 问题? 1)、如何定制和修改Servlet容器的相关配置; 1、修改和server有关的配置(ServerProperties【也是EmbeddedServletContainerCustomiz 阅读全文
posted @ 2020-07-07 18:07 Maple_XL 阅读(859) 评论(0) 推荐(0) 编辑
摘要: 错误处理机制 1)、SpringBoot默认的错误处理机制 默认效果: ​ 1)、浏览器,返回一个默认的错误页面 浏览器发送请求的请求头: ​ 2)、如果是其他客户端,默认响应一个json数据 ​ 原理: ​ 可以参照ErrorMvcAutoConfiguration;错误处理的自动配置; 给容器中 阅读全文
posted @ 2020-07-07 17:59 Maple_XL 阅读(211) 评论(0) 推荐(0) 编辑
摘要: SpringMVC自动配置 https://docs.spring.io/spring-boot/docs/1.5.10.RELEASE/reference/htmlsingle/#boot-features-developing-web-applications 1. Spring MVC aut 阅读全文
posted @ 2020-07-07 17:52 Maple_XL 阅读(410) 评论(0) 推荐(0) 编辑
摘要: 模板引擎 JSP、Velocity、Freemarker、Thymeleaf SpringBoot推荐的Thymeleaf; 语法更简单,功能更强大; 1、引入thymeleaf; <dependency> <groupId>org.springframework.boot</groupId> <a 阅读全文
posted @ 2020-07-07 17:50 Maple_XL 阅读(160) 评论(0) 推荐(0) 编辑
摘要: SpringBoot对静态资源的映射规则 @ConfigurationProperties(prefix = "spring.resources", ignoreUnknownFields = false) public class ResourceProperties implements Res 阅读全文
posted @ 2020-07-07 17:48 Maple_XL 阅读(609) 评论(0) 推荐(0) 编辑
摘要: SpringBoot运行原理初探 pom.xml 父依赖 直接父依赖主要管理项目的资源过滤及插件! <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifac 阅读全文
posted @ 2020-06-20 23:30 Maple_XL 阅读(151) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 15 下一页