Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration sample in reference doc has wrong yaml formatting #28671

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -780,13 +780,13 @@ This style of configuration works particularly well with the `SpringApplication`
[source,yaml,indent=0,subs="verbatim"]
----
my:
service:
remote-address: 192.168.1.1
security:
username: admin
roles:
- USER
- ADMIN
service:
remote-address: "192.168.1.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is doing two different things here. Are the quote around the value necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, I think the String type here is more suitable, so I just did it.

security:
username: "admin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

roles:
- USER
- ADMIN
----

To work with `@ConfigurationProperties` beans, you can inject them in the same way as any other bean, as shown in the following example:
Expand Down