Ich bin auf einen Code gestoßen, in dem @cacheable Annotation mit @Bean verwendet wird und die Klasse mit @Configuration < /p>
beispielsweise < /p>
kommentiert wurde@Configuration
public class CacheManager {
@Cacheable("urls")
@Bean
public Map loadUrl(){
// hashmap population logic
return urlMap;
}
}
< /code>
Laden Sie alle Caches in der Konfigurationsphase?
oder die @cacheable Annotation wird ignoriert. Das liegt daran>
Springboot @cacheable mit @Bean -Nutzung ⇐ Java
-
- Similar Topics
- Replies
- Views
- Last post