Default value for `in` parameter
Charles Wong <[email protected]> Sat, 28 Jan 2023 20:01:14 +0800
| Newsgroups | gmane.comp.freedesktop.dbus |
|---|---|
| Message-ID | <CAAcWGFKiu9CxRsHX4si44-wXhSmL_H8=q37D7J_fBh=n9qRrkg@mail.gmail.com> |
Hi,
Is this the right place to ask dbus questions?
For example, there is a dbus config (is from
https://gjs.guide/guides/gio/dbus.html#high-level-proxies):
```xml
<method name="ComplexMethod">
<arg type="b" direction="in" name="input"/>
<arg type="u" direction="out" name="length"/>
</method>
```
Is it possible to set a default value to parameter `input` and mark it as
unrequired?
Just like in spring mvc, we can set a parameter `required=false` and set
`default` value too:
`@RequestParam(required = false, defaultValue = "default value") String
parameter`