Skip to content

Conversation

drewharvey
Copy link
Collaborator

Moving to spring boot allows us to create an executable jar with embedded server. This way we can build the jar and copy it to the docker image, keeping it small.

…x resource not found issue

# Conflicts:
#	Dockerfile
Copied DemoView and SourceContentResolver, from vaadin demo helpers, and modified them to work with spring. Added to the build so that java files are also copied over and not just class files so that we can read the java files at runtime.
@drewharvey drewharvey requested a review from Copilot July 15, 2025 17:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request migrates the demo application to Spring Boot to produce an executable JAR and adds Docker support via a multi-stage build.

  • Switches demo packaging from WAR to Spring Boot JAR and introduces Application main class
  • Updates Maven POMs for Spring Boot parent, dependencies, build plugins, and includes Java resources for source parsing
  • Adds a Dockerfile with a multi-stage build to produce a minimal container image

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vcf-toolbar-layout-flow-demo/pom.xml Switched packaging to jar, added Spring Boot parent, updated dependencies, build plugins, and profiles
Dockerfile Introduced multi-stage Docker build and runtime ENTRYPOINT
vcf-toolbar-layout-flow-demo/src/main/resources/application.properties Configured server port and Vaadin/Spring properties
vcf-toolbar-layout-flow-demo/src/main/java/org/vaadin/addons/componentfactory/demo/Application.java Added Spring Boot application launcher
vcf-toolbar-layout-flow/pom.xml Replaced hard-coded Vaadin test dependency version with the ${vaadin.version} property
vcf-toolbar-layout-flow-demo/src/main/java/org/vaadin/addons/componentfactory/demo/helpers/SpringSourceContentResolver.java New helper to load source examples under Spring Boot
vcf-toolbar-layout-flow-demo/src/main/java/org/vaadin/addons/componentfactory/demo/helpers/AbstractDemoView.java Refactored demo base class to use the new resolver
vcf-toolbar-layout-flow-demo/src/main/java/org/vaadin/addons/componentfactory/demo/ToolbarLayoutDemoView.java Updated demo view to extend AbstractDemoView, added headline and removed reliance on the old DemoView
Comments suppressed due to low confidence (2)

vcf-toolbar-layout-flow-demo/src/main/resources/application.properties:10

  • Remove the extra '=' in the property assignment so it reads vaadin.allowed-packages=com.vaadin,org.vaadin,dev.hilla, to ensure the property is recognized.
vaadin.allowed-packages= = com.vaadin,org.vaadin,dev.hilla,

vcf-toolbar-layout-flow-demo/pom.xml:144

  • The production profile no longer sets <vaadin.productionMode>true</vaadin.productionMode> or includes the flow-server-production-mode dependency, which are required for a proper Vaadin production build. Consider restoring those settings.
            <id>production</id>

drewharvey and others added 2 commits July 15, 2025 10:43
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@drewharvey drewharvey merged commit 847e781 into main Jul 15, 2025
@drewharvey drewharvey deleted the refactor/to-spring-boot branch July 16, 2025 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant