Enabling caching in spring-boot application disables @Autowiring and affecting my other configuration classes which ends up in NPE
After using @EnableCaching in my springboot application my other service beans conflicting. The API's which has been working before was failing due to this @EnableCaching.
DatabaseSequence counter = mongoOperations.findAndModify(query(where("_id").is(seqName)),
new Update().inc("seq",1), options().returnNew(true).upsert(true),
DatabaseSequence.class);
return !Objects.isNull(counter) ? counter.getSeq() : 1;
This query has worked before but now throws null pointer >none of my queries is working after the @EnableCache.