Importing and Configuring the ClickHouse Spring Boot Sample Project
Scenarios
To run the Spring Boot interface sample code of the ClickHouse component of MRS, perform the following operations.
In the following example, an application is developed by compiling a Spring Boot project to connect to ClickHouse in Windows.
This topic is available for MRS 3.3.0 and later versions only.
Procedure
- Obtain the sample project folder clickhouse-rest-client-example in the src/springboot/clickhouse-examples directory where the sample code is decompressed. For details, see Obtaining the MRS Application Development Sample Project.
- In the application development environment, import the sample project to the IntelliJ IDEA development environment.
- Choose File > New > Project from Existing Sources....

- In the displayed Select File or Directory to Import dialog box, select the pom.xml file in the clickhouse-rest-client-example folder and click OK.
- Confirm subsequent configurations and click Next. If there is no special requirement, use the default values.
Select the recommended JDK version and click Finish.
- Choose File > New > Project from Existing Sources....
- In the IntelliJ IDEA development environment, open the clickhouse-example.properties file in the conf directory of the sample project, and change the values of the parameters listed in Table 1.
- (Optional) If machine-machine user authentication is used, download the user.keytab and krb5.conf authentication credential files of the machine-machine user by referring to Preparing MRS Application Development User, and upload the files to the conf directory of the sample project.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot