ElasticsearchBboss MySQL 同步数据到Elasticsearch

springboot集成ElasticsearchBboss调用Elasticsearch

一、搭建一个springboot项目

1)、使用的是idea工具,所以直接选中File–>New–>Project–>Spring Assistant–>Next(编写项目相关配置信息) -->Next–>Web–>Spring Web–>Next即可快速创建一个springboot的web项目;

2)、习惯使用yml文件的可以将创建项目的application.properties修改为application.yml文件

二、引入相关依赖

1)、修改maven仓库为自己配置的maven仓库;

2)、引入ElasticsearchBboss相关maven依赖。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.es</groupId>
	<artifactId>es_bboss_web</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>es_bboss_web</name>
	<description>Demo project for Spring Boot</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.6.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>




		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>

		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>

			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>com.bbossgroups.plugins</groupId>
			<artifactId>bboss-elasticsearch-spring-boot-starter</artifactId>
			<version>6.1.0</version>
			<exclusions>
				<exclusion>
					<artifactId>slf4j-log4j12</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>

			</exclusions>
		</dependency>
		<!--导入db-elasticsearch数据同步依赖包开始-->
		<dependency>
			<groupId>com.bbossgroups.plugins</groupId>
			<artifactId>bboss-elasticsearch-rest-jdbc</artifactId>
			<version>6.1.0</version>
			<exclusions>
				<exclusion>
					<artifactId
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值