Properly using (and not overusing) abstract classes is vital to having a cleanly organized and DRY application. Developers tend to get confused when trying to inject services into abstract or base classes in Spring Boot though.
Setter injection actually works fine in base classes; but as noted here, you should make sure to use the final keyword on the setter to prevent it from being overridden.
public abstract class AbstractSchemaService { ... private StringShorteningService shortener; @Autowired public final void setStringShorteningService(StringShorteningService shortener) { this.shortener = shortener; } ... }