-
Notifications
You must be signed in to change notification settings - Fork 126
Placeholder '@' in application.yaml #167
Comments
@kdvolder do you have an idea? |
Have you tried it? I bet the same workaround should work. If your substitution of the If you tried it... and it doesn't work... provide some details on the exact errors / problem you see and we can think about it some more. |
(comment in Pivotal Tracker added by Kris De Volder:) I've tried the workaround of adding quotes around the |
(comment in Pivotal Tracker added by Kris De Volder:) Example:
|
(comment in Pivotal Tracker added by Kris De Volder:) Just pushed a change that makes the workaround also work for integer properties (i.e. values containing '@...@' placeholders are skipped during type check). Making the 'naked' placeholder also work a in the following example:
... is more challenging because the naked '@' values actually break the yaml parser, so we can't get an AST. A possible approach to getting this to work would be to scan the entire document for stuff that looks like a '@...@' placeholder and replace it with something more harmless prior to parsing. E.g we could replace the leading and trailing '@' with '_'. Then walking the parse-tree to check it we also have to somehow ensure to retrieve the actula text value of scalar nodes from the original document rather than the actual parse-tree node. |
(comment in Pivotal Tracker added by Kris De Volder:) I started to try implement the handling of 'naked' So I think I'm just going to deliver this ticket as it stands. I.e. if you want to use This workaround should now also work fine for properties like |
I'm using maven resource plugin to replace some values in my application.yaml. While the @-character is not allowed as beginning of a yaml token there is this workaround to wrap the value in " or ' ( here and here ).
But is there a similar workaround for integer values like server.port?
The text was updated successfully, but these errors were encountered: