[英]Spring annotation and lifecycle.
I have 2 questions specific to Spring. 我有2个关于Spring的问题。
Does @Component, @Service have to be on the implementation or interface ? @ Component,@ Service是否必须在实现或接口上? And which one is the preferred method ?
哪一种是首选方法?
If there is an external configuration class I have for eg ApplicationConfiguration. 如果有一个外部配置类,例如ApplicationConfiguration。 How do I hook this class into the Spring lifecycle ?
如何将此类与Spring生命周期挂钩? What is the point I should look for ?
我应该寻找什么?
.properties
file for your configuration. .properties
文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.