Clean up and fix Spring configuration.

The apns dependency is disabled as it is not used here and introduces conflicts with Jackson.