Go to: https://adoptium.net/en-GB/temurin/releases/
Download the Temurin 17 LTS (Windows x64 MSI Installer).
Install it and note the path:
C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot
In Environment Variables (System variables), click 'New' →
Variable name: JAVA_HOME
Variable value: above JDK path.
In 'Path' variable, click Edit and add:
%JAVA_HOME%\bin
Save all.
Download Maven ZIP: https://maven.apache.org/download.cgi
Extract to: C:\Program Files\Apache\maven
Set environment variable MAVEN_HOME = C:\Program Files\Apache\maven
Add %MAVEN_HOME%\bin to your system Path.
Go to: https://start.spring.io/
Fill in:
Project: Maven
Language: Java
Group: com.example
Artifact: springPage
Dependencies: Spring Web and Thymeleaf
Click 'Generate' to download springPage.zip.
Extract the zip and open the folder in VS Code.
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}Create an html file or add the editor where you want it.
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>In terminal run:
./mvnw spring-boot:run
If it fails, run:
mvn spring-boot:run
View in browser: http://localhost:8080/
Or open the HTML file directly in your browser.
