摘要:
在用mybatis-plus生成代码的时候,生成代码后,springboot项目启动不了,总是这样的错误: org.springframework.beans.factory.UnsatisfiedDependencyException XXX No qualifying bean of type 阅读全文
摘要:
springboot中使用AOP做访问请求日志:这次引入springboot的aop和日志 1、pom.xml引入: <!--springBoot的aop,已经集成了spring aop和AspectJ--> <dependency> <groupId>org.springframework.boo 阅读全文
摘要:
springboot集成swagger 1、pom.xml中引入: <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.9.2</version> </ 阅读全文
摘要:
springboot中的跨域问题,如果不注意的话,容易造成错误,本次springboot版本为2.13 前端错误信息: Access to XMLHttpRequest at 'http://localhost:8080/user/loginOn' from origin 'http://local 阅读全文
摘要:
spring中的ApplicationListener是一个监听器,用来监听容器中发布的事件 监听器也是一种观察者设计模式,该接口有一个onApplicationEvent()方法, 在事件发布时,此方法将会调用,实现监听的功能。 /** * Interface to be implemented 阅读全文
摘要:
spring中的BeanDefinitionRegistryPostProcessor是BeanFactoryPostProcessor的子接口,BeanFactoryPostProcessor的作用是在bean 的定义信息已经加载但还没有初始化的时候执行方法postProcessBeanFacto 阅读全文
摘要:
spring中的BeanFactoryPostProcessor和BeanPostProcessor有些像,BeanPostProcessor是在bean的初始化前后进行一些操作, BeanFactoryPostProcessor是在所有的bean定义信息已经加载但还没有实例化时,执行方法postP 阅读全文
摘要:
根据官方文档到的说明 public interface ServletContainerInitializer Interface which allows a library/runtime to be notified of a web application's startup phase a 阅读全文
摘要:
第一种通过maven创建: 1、点击Create New Project 2、创建maven项目,选择jdk版本,点击next。 3、填写GroupId和ArtifactId,都是自定义的,然后点击next 4、填写项目路径,点击finish,这样maven项目创建成功。 5、导入相关依赖 <par 阅读全文
摘要:
1、基本概念 单例设计模式,就是采取一定的方法保证在整个的软件系统中,对某个类只能存在一个对象实例, 并且该类只提供-一个取得其对象实例的方法(静态方法)。如:一般情况下,数据库的连接 2、饿汉式 2.1、饿汉式(静态常量) class Singleton { private final stati 阅读全文