随笔分类 - Spring框架
摘要:使用 属性解决 的仓库地址不安全警告 在 的 中使用命令 可以打印出当前 存在的所有警告信息 正文 如果有报以下警告: `Using insecure protocols with repositories, without explicit opt in, has been deprecated.
阅读全文
摘要:springSecurity搭建 创建springsecurity配置文件 @Configuration @EnableWebSecurity //开启springSecurity安全配置 public class SpringSecurityConfiguration extends WebSec
阅读全文
摘要:springSecurity修改默认错误提示信息 当我们使用springSecurity登录时 提示信息一般时Bad credentials 这里为了让用户有更好的用户体验我们修改springSecurity的默认错误提示文件 springSecurity有自带的语言包 下面可以看到有中文包 不过里
阅读全文
摘要:Spring Security概述 Spring Security介绍 Spring Security 的前身是 Acegi Security ,是 Spring 项目组中用来提供安全认证服务的框架。 (https://projects.spring.io/spring-security/) Spr
阅读全文
摘要:Spring 中的 JdbcTemplate[会用] JdbcTemplate 概述 它是 spring 框架中提供的一个对象,是对原始 Jdbc API 对象的简单封装。spring 框架为我们提供了很多 的操作模板类。 操作关系型数据的: JdbcTemplate HibernateTempla
阅读全文
摘要:AOP的相关概念 AOP:全称是 Aspect Oriented Programming 即:面向切面编程。 简单的说它就是把我们程序重复的代码抽取出来,在需要执行的时候,使用动态代理的技术,在不修改源码的 基础上,对我们的已有方法进行增强。 AOP 的作用及优势 作用: 在程序运行期间,不修改源码
阅读全文
摘要:测试类中的问题和解决思路 问题 在测试类中,每个测试方法都有以下两行代码: ApplicationContext ac = new ClassPathXmlApplicationContext("bean.xml"); IAccountService as = ac.getBean("account
阅读全文
摘要:待改造的问题 我们发现,之所以我们现在离不开 xml 配置文件,是因为我们有一句很关键的配置: <!-- 告知spring框架在,读取配置文件,创建容器时,扫描注解,依据注解创建对象,并存入容器中 --> <context:component-scan base-package="com.ithei
阅读全文
摘要:创建 spring 的 的 xml 配置 文件 <context:component-scan base-package="com.itheim"/> 指定创建容器时要扫描的包 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://w
阅读全文
摘要:Spring概念 1.1.1 spring 是什么 Spring 是分层的 Java SE/EE 应用 full-stack 轻量级开源框架,以 IoC(Inverse Of Control:反转控制)和 AOP(Aspect Oriented Programming:面向切面编程)为内核,提供了展
阅读全文

浙公网安备 33010602011771号