print data from controller to ui in thymeleaf
To print data from a controller to a UI using Thymeleaf in a Spring Boot application, you'll need to follow a few steps. Here's a step-by-step guide with an example:

### 1. Set Up Your Spring Boot Application

Make sure you have the necessary dependencies in your `pom.xml` (for Maven) or `build.gradle` (for Gradle). If you're using Maven, include the following dependencies:

```xml
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>
```

### 2. Create a Controller

Create a controller that will handle requests and pass data to the Thymeleaf template.

```java
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class MyController {

    @GetMapping("/greeting")
    public String greeting(Model model) {
        String message = "Hello, welcome to Thymeleaf!";
        model.addAttribute("message", message);
        return "greeting"; // This refers to greeting.html in the templates folder
    }
}
```

### 3. Create a Thymeleaf Template

Create a Thymeleaf
${controller.data}