- Which of the following is true about Spring Boot?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.boot.*; 2 import org.springframework.boot.autoconfigure.*; 3 @SpringBootApplication 4 public class EduinqApp { 5 public static void main(String[] args) { 6 SpringApplication.run(EduinqApp.class, args); 7 System.out.println("Eduinq Boot Started"); 8 } 9 } View Answer
Correct answer: A — Eduinq Boot Started
- Which of the following is true about Spring Boot auto configuration?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot starters?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot embedded servers?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @RestController annotation?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.web.bind.annotation.*; 2 @RestController 3 class EduinqController { 4 @GetMapping("/hello") 5 public String hello(){ return "Eduinq REST Hello"; } 6 } View Answer
Correct answer: A — Eduinq REST Hello
- Which of the following is true about @GetMapping annotation?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @PostMapping annotation?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot application.properties?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot profiles?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.context.annotation.*; 2 @Configuration 3 @Profile("dev") 4 class EduinqConfig { 5 @Bean 6 public String msg(){ return "Eduinq Dev Profile"; } 7 } View Answer
Correct answer: A — Eduinq Dev Profile (if dev active)
- Which of the following is true about @Conditional annotation?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnProperty?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.boot.autoconfigure.condition.*; 2 import org.springframework.context.annotation.*; 3 @Configuration 4 class EduinqConfig { 5 @Bean 6 @ConditionalOnProperty(name="eduinq.enabled", havingValue="true") 7 public String msg(){ return "Eduinq Conditional Bean"; } 8 } View Answer
Correct answer: A — Eduinq Conditional Bean (if property set)
- Which of the following is true about @ConditionalOnClass?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnMissingBean?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot Actuator?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @SpringBootTest annotation?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot DevTools?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @PathVariable in Spring Boot?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.web.bind.annotation.*; 2 @RestController 3 class EduinqController { 4 @GetMapping("/eduinq/{name}") 5 public String hello(@PathVariable String name){ 6 return "Eduinq " + name; 7 } 8 } View Answer
Correct answer: A — Eduinq Portal (if /eduinq/Portal called)
- Which of the following is true about @RequestBody annotation?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.web.bind.annotation.*; 2 class Eduinq { 3 public String name; 4 } 5 @RestController 6 class EduinqController { 7 @PostMapping("/eduinq") 8 public String create(@RequestBody Eduinq e){ 9 return "Eduinq " + e.name; 10 } 11 } View Answer
Correct answer: A — Eduinq Portal (if JSON {"name":"Portal"} sent)
- Which of the following is true about @ResponseEntity?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConfigurationProperties?
View Answer
Correct answer: D — All of the above
- What will be printed?
1 import org.springframework.boot.context.properties.ConfigurationProperties; 2 @ConfigurationProperties(prefix="eduinq") 3 class EduinqProps { 4 private String name; 5 public String getName(){ return name; } 6 public void setName(String name){ this.name=name; } 7 } View Answer
Correct answer: A — Value of eduinq.name from properties
- Which of the following is true about Spring Boot Actuator custom endpoints?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnExpression?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot logging?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot externalized configuration?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnResource?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot banner?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @EnableConfigurationProperties?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot DevTools restart?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnWebApplication?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @ConditionalOnNotWebApplication?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot testing slices?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @Import annotation?
View Answer
Correct answer: D — All of the above
- Which of the following is true about @EnableAutoConfiguration exclusion?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot CLI?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnJava?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnCloudPlatform?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnSingleCandidate?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnBean?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnMissingClass?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @ConditionalOnProperty best practices?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot @Conditional annotations overall?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot best practices?
View Answer
Correct answer: D — All of the above
- Which of the following is true about Spring Boot REST API best practices?
View Answer
Correct answer: D — All of the above