由于pom文件中依赖了redis,服务中没用到,微服务健康监控会报redis的错误

在启动类里加

@SpringBootApplication(exclude = RedisAutoConfiguration.class)
@MapperScan("com.news.repthe.*.mapper")
@EnableTransactionManagement
@ComponentScan("com.news")
@EnableDiscoveryClient
public class NewsReptheApplication {

public static void main(String[] args) {
SpringApplication.run(NewsReptheApplication.class, args);
}

}


posted @ 2023-02-14 19:31  FY丶  阅读(32)  评论(0)    收藏  举报