java - Spring启动程序添加Elasticsearch后找不到主类
问题描述
我在 Spring 工具套件中作为 Spring Boot 应用程序运行。我在 pom.xml 中添加了 elasticsearch。然后,当我再次尝试将该程序作为 Spring Boot 应用程序运行时,它在下面抛出了以下错误。“错误:无法找到或加载主类 com.spring.elastic.SpringBootDataElasticsearchApplication”我使用 org.elasticsearch:elasticsearch:7.0.1
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
</dependency>
谁能帮我解决这个问题?
解决方案
推荐阅读
- java - 在 Play 应用程序路由中实现正则表达式
- powershell - 如何传递参数以修改 Tableau 中的过滤器以下载 PDF
- database - postgres:为什么这个 GIN 索引适用于 'text%' 而不是 '%text%'?
- java - javax.naming.CommunicationException:连接重置 [根异常是 java.net.SocketException:连接重置]
- spring-boot - 春季批处理的条件编写器
- node.js - node js express服务器postgres 500内部服务器错误
- ruby - Mongoid ruby 我正在尝试创建一个语句,我们根据两个标准进行过滤
- c++ - C++ 中的简单时间比较多线程程序(和 4 个问题)
- angular - 写入时 Ionic BLE 中的响应数据包
- python - 如何将用于创建单个图像的随机选择图像的文件名附加到 csv 文件?