vaadin / vaadin/spring

Spring auto-configuration features

Open
#277 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement needs design spring
Dominant language
Java
Stars
186
Forks
98
PR merge metrics
No merged PRs in 30d

Description

@heruan commented on Thu Dec 07 2017

When building many apps with Flow, I want to be able to create modules with shared/configurable routes and override them if needed, so that I do not have to duplicate code or write classes for the sole purpose to annotate them with @Route.

Use case:

@Route("${acme.login-route:login}")
@ConditionalOnMissingRoute
public class LoginComponent extends VerticalLayout { /* ... */ }

This could be in a module shared by many apps, each of one can override the default route in its own configuration file or override it completely with a new component if annotated with the same path.


@Legioth commented on Thu Dec 07 2017

Seems like there are two low level features at play here:

  • Support ${<expression>} in @Route values, specific to our Spring add-on
  • @ConditionalOnMissingRoute as a generic Flow feature to opt out from conflicts if there are multiple routes for the same location.

@heruan commented on Thu Dec 07 2017

Indeed. At first I considered @ConditionalOnMissingRoute as part of the add-on too, since @ConditionalOn[...] is a common convention in Spring Starters. But having it native in Flow could be useful for non-Spring developers too.


@Legioth commented on Thu Dec 07 2017

The functionality is indeed generically useful, but on the other hand the @ConditionalOn naming is quite specific to Spring.


@heruan commented on Wed Jan 03 2018

Another useful feature for Spring configuration (e.g. via properties/yml files) could be enabling push (and async servlet support).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by separating the requested capabilities: configurable ${...} values in @Route, @ConditionalOnMissingRoute, and Spring properties or YAML support for push and async servlet configuration. Read the discussion around @Route and the proposed annotation, then define separate acceptance criteria for each feature before identifying implementation entry points and tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.