摘要: Bean 的作用域 singleton 单实例 prototype 多实例,每次都是新建一个prototype, <!--Beans.xml文件--> <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springfram 阅读全文
posted @ 2022-11-26 23:53 壹剑霜寒十四州 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 配置元数据 ##XML配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLS 阅读全文
posted @ 2022-11-26 18:40 壹剑霜寒十四州 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 概念 拦截器有嘛用? 在用户登录时,防止页面跳转 代码 @Controller public class mapper1 { @GetMapping("/")// public String skip(){ return "index"; } @GetMapping("/login") public 阅读全文
posted @ 2022-11-26 15:35 壹剑霜寒十四州 阅读(11) 评论(0) 推荐(0) 编辑