Skip to Content
0
Jan 24, 2023 at 04:12 PM

ConfigurationService is null, even with Spring bean/annotation?

406 Views Last edit Jan 24, 2023 at 04:18 PM 2 rev

I have written some util functions which use ConfigurationService to fetch string values. (In src of a custom extension)

To autowire the ConfigurationSerivce outside of a controller my understanding is you need to tell spring to pick up the class through an annotation or through adding it to a bean.

Both ways I have tried have resulted in a error: Cannot invoke \"de.hybris.platform.servicelayer.config.ConfigurationService.getConfiguration()\" because \"this.configurationService\" is null

Does anyone know if my logic is off in getting the DI to work?