Set an example bean:
@Component
public class SimulationModelFactory {
and within the class I'm injecting my service example:
@Autowired
private SimulationFlowService simulationFlowService;
Service always gets null
Set an example bean:
@Component
public class SimulationModelFactory {
and within the class I'm injecting my service example:
@Autowired
private SimulationFlowService simulationFlowService;
Service always gets null
The @Autowired
annotation will try to inject some class that implements the interface SimulationFlowService
(or the classes itself).
Note that your SimulationModelFactory
class is neither. Try to write @Component
to a class that implements the interface.