You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Vaadin Spring] RootMappedCondition not completely working #478
since spring boot 2 the relaxed property binding behavior had been changed and does not work like RootMappedCondition.class uses it at the moment. Because of that the usage of property vaadin.url-mapping does not work instead of vaadin.MappingUrl which perfectly works :)
The following example shows the usage of new property binding api which should work
@Overridepublicbooleanmatches(ConditionContextcontext,
AnnotatedTypeMetadatametadata) {
VaadinConfigurationPropertiesvaadinConfigurationProperties = Binder.get(context.getEnvironment())
.bind("vaadin", VaadinConfigurationProperties.class)
.orElse(null);
if (vaadinConfigurationProperties != null) {
returnisRootMapping(vaadinConfigurationProperties.getUrlMapping());
}
returnfalse;
}
/** * Returns {@code true} if {@code mapping} is the root mapping * ({@literal "/*"}). * <p> * The mapping is controlled via the {@code vaadin.urlMapping} property * value. By default it's {@literal "/*"}. * * @param mapping * the mapping string to check * @return {@code true} if {@code mapping} is the root mapping and * {@code false} otherwise */publicstaticbooleanisRootMapping(Stringmapping) {
if (mapping == null) {
returntrue;
}
returnmapping.trim().replaceAll("(/\\**)?$", "").isEmpty();
}
Activity
mehdi-vaadin commentedon Jan 20, 2020
@mixaaaa sorry for such a late reply. It seems that you are proposing a change in
RootMappedConditionhere. Would you like to create a PR for it?fix: Always get url mapping using helpers when using Spring Boot (#13791
fix: Always get url mapping using helpers when using Spring Boot (#13791
fix: Always get url mapping using helpers when using Spring Boot (#13791
vaadin-bot commentedon May 26, 2022
This ticket/PR has been released with Vaadin 23.1.0.rc1 and is also targeting the upcoming stable 23.1.0 version.