File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
generators/spring-boot/templates/src/main/java/_package_/_entityPackage_/service Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ import org.slf4j.LoggerFactory;
5454< % _ } _%>
5555<% _ if (cacheProviderAny) { _% >
5656import org.springframework.cache.CacheManager;
57+ < % _ if (databaseTypeCouchbase) { _% >
58+ import org.springframework.cache.annotation.CacheEvict;
59+ < % _ } _% >
5760< % _ } _%>
5861<% _ if (databaseTypeSql || databaseTypeMongodb || databaseTypeNeo4j || databaseTypeCouchbase) { _% >
5962 < % _ if (! reactive) { _% >
@@ -573,6 +576,9 @@ public class UserService {
573576 .map (< %= user .adminUserDto % > :: new );
574577 }
575578
579+ < % _ if (databaseTypeCouchbase && cacheProviderAny) { _% >
580+ @CacheEvict (cacheNames = UserRepository .USERS_BY_LOGIN_CACHE , key = " #login" )
581+ < % _ } _% >
576582 < % _ if (reactive) { _% >
577583 < % _ if (databaseTypeSql) { _% >
578584 @Transactional
You can’t perform that action at this time.
0 commit comments