Which two options will inject the value of the daily.limit system property? (Choose two.)
Suggested Answer: C, D
Get Premium 2V0-72.22 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
The @Value annotation can be used to inject values from external sources into fields, constructor parameters, or method parameters. To inject a system property, the annotation can use either the ${...} placeholder syntax or the #{...} SpEL expression syntax. The former is simpler and more concise, while the latter is more powerful and flexible. Both syntaxes can access the systemProperties map, which contains all the system properties as key-value pairs.
12 comments · newest first
FR
Franklyn
4 days ago
I agree with C being wrong. It doesn't reference system properties.
LO
Lou
9 days ago
I feel like B and E could work too. They seem valid.
CO
Coral
15 days ago
I think A and D are correct. They use the right syntax.
BO
Bobbie
20 days ago
I thought B would work too, but I guess not.
NO
Noah
25 days ago
A and D are the correct ones, no doubt!
JO
Johnathon
1 month ago
Wait, is E really valid?
LI
Lisha
1 month ago
Definitely A and E!
MA
Margurite
1 month ago
I think it's A and D.
LE
Leota
2 months ago
I have a vague recollection that option B could work, but I’m not confident about how the dollar sign interacts with system properties.
PH
Phuong
2 months ago
I'm a bit confused about option A; I thought the syntax with the dollar sign was more common for system properties.
HO
Horace
2 months ago
I remember practicing with similar questions, and I feel like option E might be correct since it uses the right notation for accessing properties.
EL
Eloisa
2 months ago
I think option D looks familiar, but I'm not entirely sure if it's the right syntax for injecting system properties.