Spring Boot/Spring Boot - Application Properties Sample Test,Sample questions

Question:
@Value Annotation

1.The @Value annotation is used to read the environment or application property value in Java code.

2.If the property is not found while running the application, Spring Boot throws the Illegal Argument exception as Could not resolve placeholder spring.application.name in value ${spring.application.nam

3.Both

4.None


Question:
Are Spring Boot supports different properties based on the Spring active profile?

1.Yes

2.No


Question:
Can we keep two separate files for development and production to run the Spring Boot application?

1.Yes

2.No


Question:
Can we provide more than one application properties?

1.Yes

2.No


Question:
In Spring Boot, properties are kept in the application.properties file under the classpath?

1.Yes

2.No


Question:
Set/Change port in Spring Boot?

1.server.port = 9090

2.server.ports = 9090

3.servers.port = 9090

4.servers.ports = 9090


Question:
Spring Boot supports Application Properties support ?

1.Yes

2.No


Question:
Spring Boot, properties are kept in the application.properties file 

1.Yes

2.No


Question:
The application.properties file is located in the src/main/resources directory in Spring boot ?

1.Yes

2.No


Question:
We have a service name as r4rdemo .How do we start it with Spring Boot application?

1.spring.application.name = r4rdemo

2.spring.service .name = r4rdemo

3.Both

4.None


More MCQS

  1. Spring Boot Common Test
  2. Spring Boot - Bootstrapping
  3. Spring Boot AOP
  4. Spring Boot - Logging
  5. Spring Boot - Application Properties
  6. Spring Boot - RESTful Web Services
  7. Spring Boot - Exception Handling
  8. Spring Boot - Interceptor
  9. Spring Boot - Servlet Filter
  10. Spring Boot - Tomcat
  11. Spring Boot - File Handling
  12. Spring Boot - Service Components
  13. Spring Boot - Thymeleaf
  14. Spring Boot - CORS
  15. Spring Boot - Internationalization
  16. Spring Boot - Scheduling
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!