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

Add HTML Page

1<!DOCTYPE html>
2<html lang="en">
3<head>
4  <meta charset="UTF-8">
5  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6  <title>Spring Boot Page</title>
7  <style>
8    html, body {
9      margin: 0;
10      padding: 0;
11      height: 100vh;
12      width: 100vw;
13      overflow: hidden;
14      font-family: 'Inter', sans-serif;
15      display: flex;
16    }
17    .container {
18      flex: 1;
19      flex-direction: column;
20      display: flex;
21      height: 100%;
22      width: 100%;
23    }
24    .iframe {
25      width: 100%;
26      height: 100%;
27      border: none;
28      border-radius: 0.3rem;
29      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
30    }
31    h2 {
32      color: #343a40;
33      margin-bottom: 1rem;
34      text-align: center;
35    }
36  </style>
37</head>
38<body>
39  <div class="container">
40    <h2>Tetrons Editor</h2>
41    <iframe
42      src="http://staging.tetrons.com/editor/dist/editor-host.html"
43      width="100%" height="600"
44      style="border: none;"
45      allowfullscreen></iframe>
46  </div>
47</body>
48</html>
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