> Markdown version of [Integrations](https://vaadin.com/docs/latest/flow/integrations). Section index: [llms.txt](https://vaadin.com/docs/latest/flow/llms.txt)

# Integrations

You can integrate Vaadin with many other Java application technologies, such as Spring, CDI, OSGi, and Karaf. You can also embed Vaadin applications/components in other applications or web pages.

## <a id="technology-stacks"></a>Technology Stacks

Vaadin starter and demo projects are available in three different technology stacks. They all follow the same application architecture, where you have the UI layer as an application view, with a service-layer backend.

- Spring Boot

  Spring Boot is a Java framework for creating web services that you can deploy and run conveniently. It enables the use of Spring Framework, the popular enterprise application framework for Java EE, with minimal configuration.

  The application has a main view, which gets access to the business model service by autowiring.

  `MainView.java`

  ```java
  public class MainView extends VerticalLayout {
      public MainView(@Autowired GreetService service) {
  ```

  The service is a Spring service:

  `GreetService.java`

  ```java
  @Service
  public class GreetService implements Serializable {
      public String greet(String name) {
          if (name == null || name.isEmpty()) {
              return "Hello anonymous user";
          } else {
              return "Hello " + name;
          }
      }
  }
  ```

- Context Dependency Injection (CDI) and Java EE

  The Java Enterprise Edition (EE) includes many features for creating enterprise applications. CDI, or *context dependency injection*, is the Java EE way to manage service objects and inject them into applications, such as Vaadin UIs. CDI requires a Java EE-enabled web container; the starter projects use Apache TomEE.

  The starter project includes an example service that handles business data and logic. The service is injected into the main view, and can be injected in a similar way into other views or elsewhere.

  `MainView.java`

  ```java
  public class MainView extends VerticalLayout {
      @Inject
      private GreetService greetService;
  ```

  The service is scoped to the Vaadin session, so each user session has its own service instance.

  `GreetService.java`

  ```java
  @VaadinSessionScoped
  public class GreetService {
      public String greet(String name) {
          if (name == null || name.isEmpty()) {
              return "Hello anonymous user";
          } else {
              return "Hello " + name;
          }
      }
  }
  ```

- Plain Java servlet

  You can also choose to develop the application as a plain Java servlet. You can deploy this servlet to any Java web container that doesn’t need to support Java EE or its features.

  In a similar way to the Spring and CDI starters, the plain Java application also has a service to handle business data and logic, but you need to manage access to it yourself.

  `MainView.java`

  ```java
  public class MainView extends VerticalLayout {

      public MainView() {
          // Use TextField for standard text input
          TextField textField = new TextField("Your name");

          // Button click listeners can be defined as lambda expressions
          GreetService greetService = new GreetService();
          Button button = new Button("Say hello",
              e -> Notification.show(greetService.greet(textField.getValue())));
  ```

  In the plain Java servlet, the service is an ordinary object:

  `GreetService.java`

  ```java
  public class GreetService {
      public String greet(String name) {
          if (name == null || name.isEmpty()) {
              return "Hello anonymous user";
          } else {
              return "Hello " + name;
          }
      }
  }
  ```

* [Hilla](https://vaadin.com/docs/latest/flow/integrations/hilla.md): Create hybrid applications by combining Hilla or React views with Flow views.
* [React](https://vaadin.com/docs/latest/flow/integrations/react.md): Using React components in Flow.
* [Spring](https://vaadin.com/docs/latest/flow/integrations/spring.md): About using Spring with Vaadin applications.
* [CDI](https://vaadin.com/docs/latest/flow/integrations/cdi.md): CDI is a framework for injecting dependency objects in different contexts.
* [Embedding](https://vaadin.com/docs/latest/flow/integrations/embedding.md): How to embed an application in a web page.
* [Quarkus](https://vaadin.com/docs/latest/flow/integrations/quarkus.md): Using Quarkus with Vaadin to optimize Java for containers in serverless, cloud and Kubernetes environments.
