You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2017/04/18 11:52:42 UTC
[jira] [Resolved] (CXF-7329) Missing @Validated on CxfProperties
[ https://issues.apache.org/jira/browse/CXF-7329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-7329.
-----------------------------------
Resolution: Fixed
Assignee: Sergey Beryozkin
Fix Version/s: 3.1.12
3.2.0
Fred, thanks for the patch, I applied with some modifications:
- I made the dependencies test-only, I confirmed a spring_boot demo test fails with SpringBoot 5 when an invalid path is set, example:
{noformat}
Caused by: org.springframework.validation.BindException: org.springframework.boot.bind.RelaxedDataBinder$RelaxedBeanPropertyBindingResult: 1 errors
Field error in object 'cxf' on field 'path': rejected value [services/helloservice]; codes [Pattern.cxf.path,Pattern.path,Pattern.java.lang.String,Pattern]; arguments [org.springframework.context.support.DefaultMessageSourceResolvable: codes [cxf.path,path]; arguments []; default message [path],[Ljavax.validation.constraints.Pattern$Flag;@1ca74e69,org.springframework.validation.beanvalidation.SpringValidatorAdapter$ResolvableAttribute@622132a9]; default message [Path must start with /]
{noformat}
- Dropped the AssertJ dependency to simplify a 3.1.x merge where Java 7 is still supported.
- Using a cxf logback.classic version is enough but I'll update it to 1.2.2 in a follow up commit
Let me know if you have any concerns, thanks, Sergey
> Missing @Validated on CxfProperties
> -----------------------------------
>
> Key: CXF-7329
> URL: https://issues.apache.org/jira/browse/CXF-7329
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.1.11
> Reporter: Stephane Nicoll
> Assignee: Sergey Beryozkin
> Priority: Minor
> Fix For: 3.2.0, 3.1.12
>
>
> As of `1.5.x` Spring Boot requires any `@ConfigurationProperties` to be annotated with `@Validated` for the validation to kick in. `CxfProperties` has no such construct so validation won't occur for the `path` attribute.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)