I have my service class which does a post call. I would like to instantiate that bean/ autowire it to create a object in another class which is not a component or configuration class.

```
@Service
public class SavePayload {

  // Rest Post Call implementation 

}

```

```

    public class PayloadRecord
            implements Record {

        private String payload;

        PayloadProcessor payloadProcessor = new PayloadProcessor();

        public PayloadRecord(String payload) {
            this.payload = payload;
        }

        @SneakyThrows
        @Override
        public boolean isValid() throws ValidationException {
            payloadProcessor.savePayload(payload);
            return true;
        }

        @Override
        public byte[] getBytes(Charset charset) {
            return payload.getBytes(StandardCharsets.UTF_8);
        }

        @Override
        public String getID() {
            return payload;
        }

        @Override
        public String toString() {
            return payload;
        }

        private static class PayloadProcessor {

            @Autowired
            private SavePayload savePayload;

        }

    }

```

I'm using a template which will do the record processing. As soon as I got message received I'm assigning it to Payload in Payload Record which is non component class. I would like to initialize the SavePayload service. Save payload service is returning null.