We are currently having application in dxa-2.2 java and we are trying to separate out common code out of it as separate dxa module.
It is not getting registered on viewEntryMap
here is a initializer code
@Configuration
@ComponentScan("com.example.dxa.modules.test")
public class TestInitializer {
@RegisteredViewModels({
@RegisteredViewModel(viewName = "Test", modelClass = Test.class),
@RegisteredViewModel(viewName = "Test", modelClass = RegionModelImpl.class)
})
@Component
@ModuleInfo(name = "Test module", areaName = "Test", description = "Test module")
public static class TestModuleInitializer extends AbstractModuleInitializer {
@Override
protected String getAreaName() {
return "Test";
}
}
}
when I am trying to debug, I can not find this on
final RegisteredViewModels views = getClass().getAnnotation(RegisteredViewModels.class);
of class AbstractModuleInitializer
could you please suggest how to load this module into another dxa webapp which is having different module