随笔分类 -  Spring

摘要:官方文档 What is Apache Shiro? Apache Shiro is a powerful and easy to use Java security framework that offers developers an intuitive yet comprehensive so 阅读全文
posted @ 2024-07-19 16:18 Andy_lu020 阅读(24) 评论(0) 推荐(0) 编辑
摘要:Spring MVC 加载配置文件的几种方式 通过 context:property-placeholde 实现加载配置文件 在 springmvc.xml 配置文件里加入 context 相关引用 <?xml version="1.0" encoding="UTF-8"?> <beans xmln 阅读全文
posted @ 2024-07-10 11:39 Andy_lu020 阅读(38) 评论(0) 推荐(0) 编辑
摘要:新建一个基于 Maven 的"webapp"模板的基础工程 在 main 文件夹下新建java源码文件夹 将自动生成的index.jsp移入webapp的view文件夹下,在java下新建一个controller文件夹 添加Spring MVC框架所需的POM配置 <properties> <pro 阅读全文
posted @ 2024-07-10 10:04 Andy_lu020 阅读(294) 评论(0) 推荐(0) 编辑
摘要:使用注解的方式注入bean 在 spring-config.xml 添加如下配置: <content:component-scan base-package="org.example"/> 使用注解注入bean对象,有两类注解: (1)类注解:@Controller、@Service、@Reposi 阅读全文
posted @ 2024-07-09 16:13 Andy_lu020 阅读(33) 评论(0) 推荐(0) 编辑
摘要:创建Spring项目 IDEA打开New Project-Maven Archetype,选择Archetype:org.apache.maven.archetypes:maven-archetype-quickstart IDEA更换国内源,Maven可以配置aliyun镜像(这里略) 添加 Sp 阅读全文
posted @ 2024-07-09 11:27 Andy_lu020 阅读(269) 评论(0) 推荐(1) 编辑

点击右上角即可分享
微信分享提示