Following Liferay's documentation about making modules configurable, I wrote this Liferay 7 module:
@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");
}
}
When I deploy, the log only shows:
TranslationServiceImpl constructor
Service registered.
STARTED myproject.impl_1.0.0 [538]
Why is the activate
method not called?
Restarting the module in Gogo Shell does not call activate
either.