05 2020 档案

摘要:方法概述与定义 方法介绍 就是一个小功能。把一段代码存起来,以后可以重复使用。 static void printB() { System.out.println("b"); System.out.println("b"); System.out.println("b"); System.out.p 阅读全文
posted @ 2020-05-23 16:42 Leader_TBlog 阅读(106) 评论(0) 推荐(0)
摘要:Security方法安全 配置类中开启 添加注解 @EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true) 编写方法 /** * @title: MethodService * @projectName spr 阅读全文
posted @ 2020-05-19 22:11 Leader_TBlog 阅读(132) 评论(0) 推荐(0)
摘要:Security密码加密 密码加密 在单元测试中 使用循环生成 10次不同的 密文,在Security中 有一个 BCryptPasswordEncoder 密码加密的工具 @Test void contextLoads() { BCryptPasswordEncoder encoder = new 阅读全文
posted @ 2020-05-19 21:54 Leader_TBlog 阅读(871) 评论(0) 推荐(0)
摘要:创建一个配置类 /** * @title: MultiSecurityConfig * @projectName springsecurity * @描述: TODO * @作者: 小灰灰 * @创建时间 2020-05-1920:16 */ @Configuration public class 阅读全文
posted @ 2020-05-19 21:18 Leader_TBlog 阅读(220) 评论(0) 推荐(0)
摘要:重写 HttpSecurity @Override protected void configure(HttpSecurity http) throws Exception { // 开启配置 http.authorizeRequests() // 访问路径以: /admin/开头的 需要具备哪些角 阅读全文
posted @ 2020-05-19 21:17 Leader_TBlog 阅读(198) 评论(0) 推荐(0)
摘要:重写 HttpSecurity configure @Override protected void configure(HttpSecurity http) throws Exception { // 开启配置 http.authorizeRequests() // 访问路径以: /admin/开 阅读全文
posted @ 2020-05-16 20:18 Leader_TBlog 阅读(138) 评论(0) 推荐(1)
摘要:重写 HttpSecurity configure @Override protected void configure(HttpSecurity http) throws Exception { // 开启配置 http.authorizeRequests() // 访问路径以: /admin/开 阅读全文
posted @ 2020-05-14 00:47 Leader_TBlog 阅读(717) 评论(0) 推荐(0)
摘要:通过配置文件配置 spring.security.user.name=javaboy spring.security.user.password=1234 # 角色: 支持数组 spring.security.user.roles=admin 配置完毕,再次启动项目,访问 /hello 一样的输入用 阅读全文
posted @ 2020-05-13 22:50 Leader_TBlog 阅读(210) 评论(0) 推荐(0)
摘要:创建工程 选择依赖 这里只需要引入上面两个依赖即可, next 重点: 只要加入了 Security 的依赖,项目中的所有接口统统被保护起来了! @RestController public class HelloController { @GetMapping("/hello") public S 阅读全文
posted @ 2020-05-13 22:15 Leader_TBlog 阅读(123) 评论(0) 推荐(0)
摘要:数据类型转换 数据类型概念 Java是强类型语言 对于每一种数据,都定义了明确的数据类型. 不同的数据类型,在内存当中分配不同的大空间 数据类型分类 基本数据类型 个 数据类型占用空间大小 引用数据类型 类 接口 数组 常用数据类型 整数类型 byte、short、int、long 相同点都是存放整 阅读全文
posted @ 2020-05-11 00:36 Leader_TBlog 阅读(207) 评论(0) 推荐(0)
摘要:计算机语言概述 软件开发 人机交互 图形化界面 命令行方式 计算机语言 Java语言简介 Java概述 Java图标 Java名称的由来 我们所见到的Java标志,总是一杯热咖啡,这杯热咖啡你很难与计算机编程联想到一起。 这杯热咖啡、Java这个名字的由来,是Java创始人员团队中其中一名成员由于灵 阅读全文
posted @ 2020-05-02 15:40 Leader_TBlog 阅读(488) 评论(0) 推荐(0)