Skip to content

Commit ba8e6f5

Browse files
authored
fix: add properties for react and bun (#18866)
1 parent 3fec9e5 commit ba8e6f5

File tree

2 files changed

+85
-2
lines changed

2 files changed

+85
-2
lines changed

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

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,23 @@ public static List<String> getExcludedUrls(Environment environment) {
8484
/**
8585
* Devmode configuration options.
8686
*/
87-
8887
private Devmode devmode = new Devmode();
8988

9089
/**
9190
* Pnpm configuration options.
9291
**/
9392
private Pnpm pnpm = new Pnpm();
9493

94+
/**
95+
* Bun configuration options.
96+
**/
97+
private Bun bun = new Bun();
98+
99+
/**
100+
* React configuration options.
101+
**/
102+
private React react = new React();
103+
95104
/**
96105
* Frontend configuration options.
97106
**/
@@ -164,7 +173,7 @@ public boolean isEnable() {
164173
}
165174

166175
/**
167-
* Enables/disabled pnp support.
176+
* Enables/disabled pnpm support.
168177
*
169178
* @param enable
170179
* if {@code true} then pnpm support is enabled, otherwise
@@ -177,6 +186,60 @@ public void setEnable(boolean enable) {
177186

178187
}
179188

189+
public static class Bun {
190+
191+
private boolean enable;
192+
193+
/**
194+
* Returns if bun support is enabled.
195+
*
196+
* @return if bun is enabled
197+
*/
198+
public boolean isEnable() {
199+
return enable;
200+
}
201+
202+
/**
203+
* Enables/disabled bun support.
204+
*
205+
* @param enable
206+
* if {@code true} then bun support is enabled, otherwise
207+
* it's disabled
208+
*
209+
*/
210+
public void setEnable(boolean enable) {
211+
this.enable = enable;
212+
}
213+
214+
}
215+
216+
public static class React {
217+
218+
private boolean enable = true;
219+
220+
/**
221+
* Returns if react support is enabled.
222+
*
223+
* @return if react is enabled
224+
*/
225+
public boolean isEnable() {
226+
return enable;
227+
}
228+
229+
/**
230+
* Enables/disabled react support.
231+
*
232+
* @param enable
233+
* if {@code true} then react support is enabled, otherwise
234+
* it's disabled
235+
*
236+
*/
237+
public void setEnable(boolean enable) {
238+
this.enable = enable;
239+
}
240+
241+
}
242+
180243
public static class Devmode {
181244
/**
182245
* A comma separated list of IP addresses, potentially with wildcards,
@@ -484,6 +547,24 @@ public Pnpm getPnpm() {
484547
return pnpm;
485548
}
486549

550+
/**
551+
* Gets the bun specific configuration.
552+
*
553+
* @return the bun configuration
554+
*/
555+
public Bun getBun() {
556+
return bun;
557+
}
558+
559+
/**
560+
* Gets the react specific configuration.
561+
*
562+
* @return the react configuration
563+
*/
564+
public React getReact() {
565+
return react;
566+
}
567+
487568
/**
488569
* Gets the frontend specific configuration.
489570
*

vaadin-spring/src/test/java/com/vaadin/flow/spring/SpringClassesSerializableTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ protected Stream<String> getExcludedPatterns() {
6868
"com\\.vaadin\\.flow\\.spring\\.VaadinConfigurationProperties\\$Pnpm",
6969
"com\\.vaadin\\.flow\\.spring\\.VaadinConfigurationProperties\\$Frontend",
7070
"com\\.vaadin\\.flow\\.spring\\.VaadinConfigurationProperties\\$Devmode",
71+
"com\\.vaadin\\.flow\\.spring\\.VaadinConfigurationProperties\\$Bun",
72+
"com\\.vaadin\\.flow\\.spring\\.VaadinConfigurationProperties\\$React",
7173
"com\\.vaadin\\.flow\\.spring\\.VaadinScanPackagesRegistrar",
7274
"com\\.vaadin\\.flow\\.spring\\.VaadinScanPackagesRegistrar\\$VaadinScanPackages",
7375
"com\\.vaadin\\.flow\\.spring\\.VaadinServletContextInitializer",

0 commit comments

Comments
 (0)