nerdexam
Broadcom-VMware

2V0-72.22PSE · Question #10

Refer to the exhibit. Which two statements are correct regarding the HelloAutoConfig auto- configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)

The correct answer is B. A HelloService bean will be created from the helloService() method only when there is no other D. This auto-configuration class is used only when the HelloService.class is on the classpath. https://docs.spring.io/spring-boot/docs/1.2.5.RELEASE/reference/html/boot-features-developing- auto-configuration.html#boot-features-class-conditions https://docs.spring.io/spring-boot/docs/1.2.5.RELEASE/reference/html/boot-features-developing…

Cloud Native

Question

Refer to the exhibit. Which two statements are correct regarding the HelloAutoConfig auto- configuration class when it is specified in the META-INF/spring.factories file? (Choose two.)

Exhibit

2V0-72.22PSE question #10 exhibit

Options

  • AA HelloService bean will be created from the helloService() method even if the
  • BA HelloService bean will be created from the helloService() method only when there is no other
  • CThis auto-configuration class is used only when the HelloService.class is not on the classpath.
  • DThis auto-configuration class is used only when the HelloService.class is on the classpath.
  • EA HelloService bean will be created from the helloService() method and will replace existing a

How the community answered

(57 responses)
  • A
    5% (3)
  • B
    81% (46)
  • C
    11% (6)
  • E
    4% (2)

Explanation

https://docs.spring.io/spring-boot/docs/1.2.5.RELEASE/reference/html/boot-features-developing- auto-configuration.html#boot-features-class-conditions https://docs.spring.io/spring-boot/docs/1.2.5.RELEASE/reference/html/boot-features-developing- auto-configuration.html#boot-features-bean-conditions

Topics

#auto-configuration#@ConditionalOnMissingBean#@ConditionalOnClass#spring.factories

Community Discussion

No community discussion yet for this question.

Full 2V0-72.22PSE Practice