Spring
文章平均质量分 94
DreamMakers
凡办大事,以识为主,以才为辅,凡成大事,人谋居半,天意居半。
展开
-
读取属性配置文件的五种方式
读取属性配置文件的五种方式读取属性配置文件的五种方式读取属性配置的示例属性配置文件方式一:使用注解@Value读取属性配置方式二:使用注解@ConfigurationProperties读取属性配置方式三:使用注解 @PropertySource 和 @Value 来读取属性配置方式四:使用注解 @PropertySource 和 @ConfigurationProperties 来读取属性配置方...转载 2020-02-25 19:48:58 · 825 阅读 · 1 评论 -
在SpringBoot中,怎么在应用程序启动或退出时执行初始化或者清理工作?
在SpringBoot中,怎么在程序启动或退出时执行初始化或者清理工作?有的时候我们需要在应用程序启动的时候执行一些资源初始化的工作,或者在应用程序退出的时候进行一些资源释放的工作,那么该如何做呢?这篇文章针对两个问题做一个汇总说明。怎么在应用程序启动时执行一些初始化工作?我们在开发中可能会有这样的情景。需要在容器启动的时候执行一些内容。比如读取配置文件,数据库连接之类的。SpringBoo...原创 2019-11-30 10:30:04 · 3158 阅读 · 2 评论 -
1.4 依赖(part3)
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。 1.4.3. Using depends-onIf a bean is a dependency of another that usually mea...翻译 2018-08-26 15:19:30 · 473 阅读 · 0 评论 -
1.4 依赖(part1)
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。 1.4. DependenciesA typical enterprise application does not consist of a sing...翻译 2018-08-17 20:10:56 · 377 阅读 · 0 评论 -
1.3 Bean概述
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。 1.3. Bean overviewA Spring IoC container manages one or more beans. These be...翻译 2018-08-15 20:31:50 · 1381 阅读 · 0 评论 -
1.4 依赖(part2)
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。1.4.2. Dependencies and configuration in detail依赖与配置详解As mentioned in the ...翻译 2018-08-19 16:05:19 · 457 阅读 · 0 评论 -
1.2 容器概述
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。 1.2. Container overviewThe interface org.springframework.context.Application...翻译 2018-08-15 20:31:10 · 500 阅读 · 0 评论 -
1.1 Spring IOC容器和Beans介绍
官方英文版地址:https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/core.html备注:翻译如有不对,请多指正,谢谢。 1.1. Introduction to the Spring IoC container and beansThis chapter covers t...翻译 2018-08-15 20:30:33 · 684 阅读 · 0 评论