摘要: Spring IOC主要是控制反转 1 public class A(){ 2 System.out.println("a"); 3 } 4 public class B(){ 5 System.out.println("b"); 6 } 如果要在A中使用B,可以通过new B()的形式使用,这样就 阅读全文
posted @ 2023-01-24 23:56 JavaShop 阅读(16) 评论(0) 推荐(0) 编辑
摘要: @RequestMapping("getUser") public void getUser(HttpServletRequest req){ String remoteUser=req.getRemoteUser(); Authentication auth=(Authentication) re 阅读全文
posted @ 2022-06-16 10:48 JavaShop 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); System.out.println("authentication.getClass() = " + authentica 阅读全文
posted @ 2022-06-16 10:29 JavaShop 阅读(432) 评论(0) 推荐(0) 编辑
摘要: Spring Security提供了很多默认filter,这些filter不是直接放在Web项目的原生过滤器中,而是通过FilterChainProxy来统一管理,可以设置多个过滤器链FilterChainProxy来实现多个不同认证体系;FilterChainProxy是通过Spring框架提供的 阅读全文
posted @ 2022-06-14 17:15 JavaShop 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 一、Spring Security的用户认证信息保存在Authentication的实现类中 二、使用AuthenticationManager来管理Authentication,AuthenticationManager有个authenticate方法来做认证 三、AuthenticationPr 阅读全文
posted @ 2022-06-14 17:09 JavaShop 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 1.效果 2.配置 2.1 在init中添加图片上传函数 // 图片上传 images_upload_handler: (blobInfo, success, failure) => { // const img = 'data:image/jpeg;base64,' + blobInfo.base 阅读全文
posted @ 2022-05-20 09:58 JavaShop 阅读(1277) 评论(0) 推荐(0) 编辑
摘要: TinyMCE是一款开源、易用、UI时新的富文本编辑器。 插件丰富,自带插件基本满足要求 可扩展性强,可自定义功能 界面好看,符合现代审美 提供经典、内联、沉浸无干扰三种模式 官网:https://www.tiny.cloud/ 1.引入方式: <!DOCTYPE html> <html> <hea 阅读全文
posted @ 2022-05-16 14:54 JavaShop 阅读(356) 评论(0) 推荐(0) 编辑
摘要: 1.安装 npm install @tinymce/tinymce-vue@3.0.1 -S 2.配置 <template> <!-- 富文本 --> <div> <textarea :id="tinymceId" class="tinymce-textarea" /> </div> </templ 阅读全文
posted @ 2022-05-16 14:43 JavaShop 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 加载顺序依次是:1、jar的classes里面的application.properties 2、当前路径下config里面的application.properties 3、jar的classes里面的application-prod.properties 4、当前路径下config里面的appl 阅读全文
posted @ 2022-04-12 17:01 JavaShop 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1.在intellj中新建项目,选择JDK版本(1.8版本) 2.选择相关信息填写,注意Java版本要和上面步骤选择的版本一致。 3.选择springBoot版本,勾选Spring Web选项。 4.填写项目相关信息 5.点击Finish 6.增加Contoller @SpringBootAppli 阅读全文
posted @ 2022-04-12 15:00 JavaShop 阅读(89) 评论(0) 推荐(0) 编辑