Liferay's documentation about making modules configurable
@Component(configurationPid = "myproject.api.TranslationConfiguration")
public class TranslationServiceImpl implements TranslationService {
private volatile TranslationConfiguration configuration;
public TranslationServiceImpl() {
log.info("TranslationServiceImpl constructor");
}
@Activate
@Modified
protected void activate(Map<String, Object> properties) {
log.info("Hello from activate");
}
}
部署时,日志仅显示:
TranslationServiceImpl constructor
Service registered.
STARTED myproject.impl_1.0.0 [538]
为什么是
activate
方法未调用?
重新启动Gogo Shell中的模块不会调用
使活动
任何一个