SpringApplication.run(Application.class, args); } } 4、使用缓存 在需要缓存的方法上添加@Cacheable注解,并指定缓存名称和键值: import org.springframework.cache.annotation.Cacheable; import org.springframework.stereotype.Service; @Service public class UserService { @Cacheable(value = "user", key = "...