Spring Boot Guide

1

Install Java 17+

1Step 1

Go to: https://adoptium.net/en-GB/temurin/releases/

2Step 2

Download the Temurin 17 LTS (Windows x64 MSI Installer).

3Step 3

Install it and note the path:

4Step 4

C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot

5Step 5

In Environment Variables (System variables), click 'New' →

6Step 6

Variable name: JAVA_HOME

7Step 7

Variable value: above JDK path.

8Step 8

In 'Path' variable, click Edit and add:

9Step 9

%JAVA_HOME%\bin

10Step 10

Save all.

2

Install Maven

1Step 1

Download Maven ZIP: https://maven.apache.org/download.cgi

2Step 2

Extract to: C:\Program Files\Apache\maven

3Step 3

Set environment variable MAVEN_HOME = C:\Program Files\Apache\maven

4Step 4

Add %MAVEN_HOME%\bin to your system Path.

3

Create Project

1Step 1

Go to: https://start.spring.io/

2Step 2

Fill in:

3Step 3

Project: Maven

4Step 4

Language: Java

5Step 5

Group: com.example

6Step 6

Artifact: springPage

7Step 7

Dependencies: Spring Web and Thymeleaf

8Step 8

Click 'Generate' to download springPage.zip.

9Step 9

Extract the zip and open the folder in VS Code.

4

Add Tetrons Iframe Page – Controller

1package com.example.springPage.controller;
2
3import org.springframework.stereotype.Controller;
4import org.springframework.web.bind.annotation.GetMapping;
5
6@Controller
7public class PageController {
8    @GetMapping("/")
9    public String home() {
10        return "index";
11    }
12}
5

Embed Tetrons Editor

1Step 1

Create an html file or add the editor where you want it.

2Step 2

Add the provided iframe of Tetrons editor into your code.

1<body>
2  <iframe
3    id="tetrons-iframe"
4    src="https://product.tetrons.com/embed"
5    style="width:100%; height:100vh; border:none;"
6    allow="clipboard-read; clipboard-write; microphone; camera"
7  ></iframe>
8</body>
6

Run the Project

1Step 1

In terminal run:

2Step 2

./mvnw spring-boot:run

3Step 3

If it fails, run:

4Step 4

mvn spring-boot:run

5Step 5

View in browser: http://localhost:8080/

6Step 6

Or open the HTML file directly in your browser.

Output Preview

Output Preview
Chatbot