Disclaimer: The main motive to provide this solution is to help and support those who are unable to do these courses due to facing some issue and having a little bit lack of knowledge. All of the material and information contained on this website is for knowledge and education purposes only.
Try to understand these solutions and solve your Hands-On problems. (Not encourage copy and paste these solutions)
Course Path: Microservices/CONSTRUCTION/Spring Boot - API Cantabile
All Question of the Quiz Present Below for Ease Use Ctrl + F to find the Question.
Suggestion: If you didn't find the question, Search by options to get a more accurate result.
1.Which Spring annotation can be used to expose a controller as REST API?
- @Controller
- None of the options
- @RestAPIController
- @RestController
Answer: 4)@RestController
2.@RequestMapping(value = "/hospitals/{id}", method = RequestMethod.GET) How to get the value of id in controller method?
- @Variable("id")
- @PathVariable("id")
- None of the options
- @RequestVariable("id")
- @RequestMapping(“id�)
Answer: 2)@PathVariable("id")
3.Which is the class that has to be autowired with the controller class for invoking processes?
- Model
- Entity
- None of the options
- Service
- Any of the options
Answer: 4)Service
4.Spring Boot Microservices are loosly coupled, independent, constrained and abstracted.
- True
- False
Answer: 1)True
1.________ can be used to over a SQL as well as NoSQL database.
- Spring JPA
- None of the options
- Spring Data
- Spring JDBCTemplate
Answer: 3)Spring Data
2.Which specification allows ORM over RDBMS?
- Spring Persistence API
- Spring ORM API
- Java Persistence API
- Java ORM API
Answer: 3)Java Persistence API
3.Embedded database support has persistent data storage.
- True
- False
Answer: 2)False
4.Embedded DB support is not available for ___________.
- H2
- Derby
- HSQL
- Oracle
Answer: 4)Oracle
5.What is the dependency to be added to configure JPA to Spring Boot Project?
- None of the options
- Spring-boot-starter-data-jpa
- Spring-boot-starter-jpa
- Spring-boot-starter-data
Answer: 2)Spring-boot-starter-data-jpa
1.What are the security techniques that can be used for Spring Boot Microservices?
- Oauth
- HTTP Digest
- None of the options
- HTTP Basic
- All the options
Answer: 5)All the options
2.Spring Boot offers ______ template to consume REST Services.
- RestTemplate
- MockMVC
- RestMVC
- None of the options
Answer: 1)RestTemplate
3.In Basic authentication, username and password are
- base64 encoded
- base16 encoded
- sha256 hashed
- RSA encrypted
Answer: 1)base64 encoded
4.Which is the correct format for HTTP Basic security technique?
- Authorization: dm9yZGVsOnZvcmRlbA==
- None of the options
- Authorization: Basic dm9yZGVsOnZvcmRlbA==
Answer: 3)Authorization: Basic dm9yZGVsOnZvcmRlbA==
5.Which is not a valid method in RestTemplate to get http request?
- getForObject
- getForEntity
- None of the options
- getForLocation
Answer: 4)getForLocation
1.Which is the class level annotation that is used to test Repository class?
- @DataJpaTest
- @JpaTest
- All the options
- @DataTest
- None of the options
Answer: 1)@DataJpaTest
2._________ class has to be auto wired to the Repository test class to test Repository class.
- None of the options
- TestDataEntity
- Both the options
- TestEntityManager
Answer: 4)TestEntityManager
3.Which annotation can be used to run quick unit tests?
- @SpringBootTest
- @IntTest
- @IntegrateTest
- @SpringTest
Answer: 1)@SpringBootTest
4.In Spring Boot, unit testing can be done on ______ class.
- None of the options
- Repository
- Service
- Controller
- All the options
Answer: 5)All the options
5.What is the technique used to do unit testing on a Controller class?
- TestMvc
- None of the options
- RestMvc
- All the options
- MockMvc
Answer: 5)MockMvc
1.What are the template engine/engines that is/are not supported by Spring Boot?
- FreeMarker
- Thymeleaf
- Groovy
- None of the options
- All the options
Answer: 5)All the options
2.Which is the Spring Boot starter that has to be added to include Thymeleaf template engine?
- spring-boot-starter-thymeleaf
- None of the options
- Spring-boot-thymeleaf-starter
- Spring-boot-thymeleaf
Answer: 1)spring-boot-starter-thymeleaf
3.Which is the UI Web framework that is built to use Spring Boot?
- Bootstrap
- None of the options
- HTML KickStart.
- Vaadin
- SproutCore
Answer: 4)Vaadin
4.Http method Patch is used to ___________.
- Add a new entity
- Update an entity
- Delete an entity
- Modify an entity
- None of the options
Answer: 4)Modify an entity
5.Which is not a valid Cache provider supported by Spring Boot?
- Couchbase
- EhCache 2.x
- None of the options
- Redis
- Hazelcast
Answer: 3)None of the options
6.Integration testing can be done using _________.
- TestRestTemplate
- MvcTest
- TestTemplate
- MockMvc
Answer: 1)TestRestTemplate
7.Which is the Spring Boot annotation used for caching auto configuration?
- @Cache
- None of the options
- @Cacheable
- @CacheEnabled
Answer: 3)@Cacheable
8.Which is not a valid method in RestTemplate to http post request?
- postForObject
- None of the options
- postForLocation
- Both the options
Answer: 2)None of the options
9.Any configuration on Logback logging has to be done in ______.
- either application.properties or application.yml
- None of the options
- application.properties
- application.yml
Answer: 3)application.properties
10.This authentication/Authorization mechanism helps to access resource through third party resources.
- HTTP Basic
- None of the options
- X509
- Oauth
Answer: 4)Oauth
11.Which is the default logging file in springboot?
- logback
- log.log
- logback.log
- spring.log
Answer: 1)logback
12.What are the template engine/engines that is/are not supported by Spring Boot?
- Groovy
- Thymeleaf
- None of the options
- All the options
- FreeMarker
Answer: 3)None of the options
13.Repository class has to extend ______ class to get the implementation benefit of Spring Data.
- CrudRepository
- CrudRep
- No Class needs to extended
- CrudRepositoryTest
Answer: 1)CrudRepository
14.What is the Spring Boot starter that has to be added for logging?
- Spring-boot-logging-starter
- None of the options
- Spring-boot-logging
- spring-boot-starter-logging
Answer: 4)spring-boot-starter-logging
15.What is the annotation to be added for Entity class?
- @Entity
- None of the options
- @JPAEntity
- @DataEntity
Answer: 1)@Entity
16.What are the HTTP methods that cannot be implemented in Spring Boot Rest Service?
- Del
- Get
- Patch
- Post
- Put
Answer: 3)Patch
17.Service class added to Rest API should be annotated as _________.
- Any of the options
- @RestAPIService
- @Service
- @RestService
- None of the options
Answer: 3)@Service
18.Which is the Spring boot starter that has to be added to include Freemarker template engine?
- None of the options
- Spring-boot-freemarker
- spring-boot-starter-freemarker
- Spring-boot-freemarker-starter
Answer: 3)spring-boot-starter-freemarker
19.While implementing security, you need to add AuthenticationEntryPoint class to extend _______ class.
- AuthenticationEntry
- BasicAuthentication
- None of the options
- BasicAuthenticationEntryPoint
Answer: 4)BasicAuthenticationEntryPoint
20.Which is the dependency to be added to include basic security to the project?
- Spring-boot-security
- None of the options
- spring-boot-starter-security
- spring-starter-security
Answer: 3)spring-boot-starter-security
21.What is the method name to fetch all data for a entity from database in Repository class?
- None of the options
- findAllItems()
- findAll()
- getAll()
Answer: 3)findAll()
22.______ class does magic in Spring Data Integration implementation.
- Service
- JPARepository
- CrudRepository
- Repo
Answer: 4)Repo
23.Service class added to Rest API should be annotated as _________.
- None of the options
- @Service
- Any of the options
- @RestService
- @RestAPIService
Answer: 2)@Service
24.Which is the Spring Boot annotation used for caching auto configuration?
- None of the options
- @Cache
- @CacheEnabled
- @Cacheable
Answer: 3)@CacheEnabled
25.Which mechanism can be used to secure basic http or http digest authentications?
- None of the options
- Oath2
- SSL/TLS encryption
- Controller Based Authentication
Answer: 3)SSL/TLS encryption
26.Spring boot uses ___________ by default for logging.
- Loopback
- Logger
- None of the options
- Logback
Answer: 4)Logback
27.Annotation @PathVariable is used to _________.
- None of the options
- Map an entity
- Map a path URI
- Map an input param
Answer: 4)Map an input param
28.What are the Rest Template methods that can be used to handle any kind of request type?
- None of the options
- execute
- exchange
- Both the options
Answer: 4)Both the options
- List of Fresco Play Courses without Hands-On | Fresco Play
- HMTL5 Semantics Elements MCQs Answers | Fresco Play
- HMTL5 Semantics Elements Hands-On Solutions | Fresco Play
- Styling with CSS3 Hands-On Solutions | Fresco Play
- Blockchain Intermedio MCQs Answers | Fresco Play
- Blockchain - Potentes Nexus MCQs Answers | Fresco Play
- Azure Essentials MCQs Answers | Fresco Play
- AWS Essentials MCQs Answers | Fresco Play