Skip to content

Commit e8e696c

Browse files
vaadin-botwutzebaermshabarov
authored
fix: expose vaadin.eagerServerLoad in Spring properties metadata (#24168) (CP: 25.0) (#24174)
This PR cherry-picks changes from the original PR #24168 to branch 25.0. --- #### Original PR description > Add eagerServerLoad to VaadinConfigurationProperties so Spring Boot can generate configuration metadata and IDE autocomplete for the documented vaadin.eagerServerLoad property. > > Made-with: Cursor > > <!-- PLEASE READ AND FOLLOW THE TEMPLATE! THE PR CAN BE REJECTED OTHERWISE (This line should be removed when submitting) --> > > ## Description > > Please list all relevant dependencies in this section and provide summary of the change, motivation and context. > > Fixes # (issue) > > ## Type of change > > - [ ] Bugfix > - [x] Feature > > ## Checklist > > - [x] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/ > - [x] I have added a description following the guideline. > - [x] The issue is created in the corresponding repository and I have referenced it. > - [x] I have added tests to ensure my change is effective and works as intended. > - [x] New and existing tests are passing locally with my change. > - [x] I have performed self-review and corrected misspellings. > > #### Additional for `Feature` type of change > > - [ ] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created. > Co-authored-by: Peter Großmann <petergrossmann@email.de> Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
1 parent 1a49b2e commit e8e696c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

vaadin-spring/src/main/java/com/vaadin/flow/spring/VaadinConfigurationProperties.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@ public static List<String> getAllowedPackages(Environment environment) {
144144
*/
145145
private int launchBrowserDelay = 30;
146146

147+
/**
148+
* Enables the client-side bootstrap page to include the initial JSON data
149+
* fragment.
150+
*/
151+
private boolean eagerServerLoad = false;
152+
147153
/**
148154
* URL patterns that should not be handled by the Vaadin servlet when mapped
149155
* to the context root.
@@ -444,6 +450,29 @@ public void setLaunchBrowserDelay(int launchBrowser) {
444450
this.launchBrowserDelay = launchBrowser;
445451
}
446452

453+
/**
454+
* Returns whether the client-side bootstrap page should include the initial
455+
* JSON data fragment.
456+
*
457+
* @return {@code true} if eager server load is enabled, {@code false}
458+
* otherwise
459+
*/
460+
public boolean isEagerServerLoad() {
461+
return eagerServerLoad;
462+
}
463+
464+
/**
465+
* Sets whether the client-side bootstrap page should include the initial
466+
* JSON data fragment.
467+
*
468+
* @param eagerServerLoad
469+
* {@code true} to enable eager server load, {@code false}
470+
* otherwise
471+
*/
472+
public void setEagerServerLoad(boolean eagerServerLoad) {
473+
this.eagerServerLoad = eagerServerLoad;
474+
}
475+
447476
/**
448477
* Returns whether class scan caching between reloads when using Spring Boot
449478
* DevTools should be enabled.

0 commit comments

Comments
 (0)