spring boot - @EnableCaching affecting other service and repos - Stack Overflow

admin2025-04-20  0

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.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745106053a285295.html

最新回复(0)