Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam 2V0-72.22 All Questions

View all questions & answers for the 2V0-72.22 exam

Exam 2V0-72.22 topic 1 question 2 discussion

Actual exam question from VMware's 2V0-72.22
Question #: 2
Topic #: 1
[All 2V0-72.22 Questions]

Which two options will inject the value of the daily.limit system property? (Choose two.)

  • A. @Value(“#{daily.limit}”)
  • B. @Value(“$(systemProperties.daily.limit)”)
  • C. @Value(“$(daily.limit)”)
  • D. @Value(“#{systemProperties[‘daily.limit’]}”)
  • E. @Value(“#{systemProperties.daily.limit}”)
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Uteman
1 month, 1 week ago
Selected Answer: E
Dand E are correct
upvoted 1 times
...
stefumies
3 months, 1 week ago
Of these answers onky D is correct it uses SPEL but with usual value injection it should be dollar sign and curly brace, not regular parenthisis "#{systemProperties['daily.limit']}" is correct Option C: @Value("$(daily.limit)") is BOT CORRECT it requires "{" not "("
upvoted 1 times
...
Evoila_TrainingMaterial
4 months, 1 week ago
Selected Answer: CD
Correct Choices: Option C: @Value("${daily.limit}") Option D: @Value("#{systemProperties['daily.limit']}") These two options correctly inject the value of the daily.limit system property. Incorrect Choices Explanation: Option A: @Value("#{daily.limit}") This syntax is incorrect because it looks for a bean named daily.limit in the Spring context, not a system property. Option B: @Value("$(systemProperties.daily.limit)") This is incorrect because the $(...) syntax is not valid in Spring's @Value annotation. Option E: @Value("#{systemProperties.daily.limit}") This is incorrect because the correct SpEL syntax requires the use of ['...'] for accessing properties dynamically.
upvoted 1 times
stefumies
1 month ago
C. @Value(“$(daily.limit)”) is INCCORECT as it is using "(" parens not "{" curlies. Im not sure if this is merely a font issue here, but it is not correct in this format. SPel uses curlies.
upvoted 1 times
...
...
Evoila_TrainingMaterial
4 months, 1 week ago
Correct Choices: Option C: @Value("${daily.limit}") Option D: @Value("#{systemProperties['daily.limit']}") These two options correctly inject the value of the daily.limit system property. Incorrect Choices Explanation: Option A: @Value("#{daily.limit}") This syntax is incorrect because it looks for a bean named daily.limit in the Spring context, not a system property. Option B: @Value("$(systemProperties.daily.limit)") This is incorrect because the $(...) syntax is not valid in Spring's @Value annotation. Option E: @Value("#{systemProperties.daily.limit}") This is incorrect because the correct SpEL syntax requires the use of ['...'] for accessing properties dynamically.
upvoted 1 times
...
james2033
9 months, 4 weeks ago
Probably, the question is incorrect. Correct way of Spring Express language like this https://docs.spring.io/spring-framework/docs/3.0.x/reference/expressions.html value="#{ systemProperties['user.region'] }" and/or value="#{ numberGuess.randomNumber }" and/or @Value("#{ systemProperties['user.region'] }") private String defaultLocale;
upvoted 1 times
...
Glothan
11 months, 2 weeks ago
Selected Answer: DE
The C is not for systemproperties but only for application properties. In the exam the "(" are replaced by "{". Correct answers are DE
upvoted 2 times
...
Glothan
11 months, 2 weeks ago
Selected Answer: BD
The C is not for systemproperties but only for application properties. In the exam the "(" are replaced by "{". Correct answers are BD
upvoted 1 times
...
Azuni
1 year, 2 months ago
Selected Answer: CD
This question appeared on my exam. There is an error on the answers. Answer C is different than in the exam. The text in the exam is @Value(“${daily.limit}”).
upvoted 3 times
...
Tolo01
1 year, 4 months ago
Selected Answer: D
Only D is the correct answer
upvoted 4 times
Azuni
1 year, 3 months ago
I also realized this now. The way the question is formulated, B and C, has () and not {}. Only D will work. If the () in B and C were changed to {}, then C and D will be correct.
upvoted 1 times
...
...
qqoo
1 year, 4 months ago
Answer is CD
upvoted 2 times
Azuni
1 year, 3 months ago
I tested all scenarios on my own IDE and it confirms your answer that it is C and D.
upvoted 1 times
...
...
rhuanca
1 year, 8 months ago
A. @Value(“#{daily.limit}”) E. @Value(“#{systemProperties.daily.limit}”) because we are talking about SystemProperty
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...