Fix compilation error and missing Spring wiring