小鹿记录

Spring创建Bean & AOP & Transaction

Spring创建Bean & AOP & Transaction Spring创建Bean Spring来生成bean,就是让注解生效,自动注入属性值 和 生成代理类。 refer to : https://segmentfault.com/a/1190000045553851 将AOP应用到Bea

Administrator Administrator 发布于 2025-01-13

proxy-target-class

含义 proxy-target-class属性值决定是基于接口的还是基于类的代理被创建。 true,则是基于类的代理将起作用(需要cglib库), false或者省略这个属性,则标准的JDK 基于接口的代理将起作用。 但是,即使设置为false,如果目标类没有生命接口,则Spring将自动使用CGL

Administrator Administrator 发布于 2025-01-13

SpringBoot Yaml Properties

Duration (java.time.Duration) 在yaml properties 中的配置方法 在RedisProperties的配置中,使用到了Duration类,来表示时间属性,这里记录下 实际样例: host: 218.94.128.34 port: 16379 database:

Administrator Administrator 发布于 2024-10-22

SpringBoot相关的parent和dependency

目前,主要有以下几种: spring-boot-starter-parent spring-boot-dependencies spring-boot-starter spring-boot-starter-parent vs spring-boot-dependencies 1.1 简介 spri

Administrator Administrator 发布于 2024-09-03

resource read

问题:如何读取src/main/resources下的配置文件(资源文件)呢? 要解决这个问题,我们先来了解几个背景知识 classpath* 和 classpath 可以通过classpath*前缀指定,从所有的类路径下获取指定的文件,与classpath前缀的区别: 是classpath前缀只能

Administrator Administrator 发布于 2024-08-18

the create of Bean

the create of Bean 通过ImportBeanDefinitionRegistrar动态注入Bean ImportBeanDefinitionRegistrar使用 Spring官方通过ImportBeanDefinitionRegistrar实现了@Component、@Servi

Administrator Administrator 发布于 2024-07-11

Hikari DataSource

refer to : https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.data.spring.datasource.hi

Administrator Administrator 发布于 2023-07-27

Spring Application Properties

refer to : https://docs.spring.io/spring-boot/docs/current/reference/html/application-properties.html#application-properties.data.spring.datasource.hi

Administrator Administrator 发布于 2023-07-27

spring-boot-starter-parent & spring-boot-dependencies

场景首先,我们需要明白的是,使用这2个jar的目的,是为了解决什么问题呢?当我们使用 spring 或 spring-boot 开发项目时,需要引入很多依赖,包括 spring 本身的组件、各种 spring-boot-starter、以及其它第三方依赖(如:slf4j、redis)。依赖多了,版本

Administrator Administrator 发布于 2023-07-25