Explanation for important Questions

Answer:
Here’s the complete guide


Answer:
RequestMapping is generic - you can use with GET, POST, PUT or any of the other request methods using the method attribute on the annotation.

GetMapping is specific to GET request method. It’s just an extension of RequestMapping to improve clarity.


Answer:
You would need to do 2 Steps.

Generate a war from the project.

Deploy it to your favourite server (Websphere or Weblogic or Tomcat or …).


Answer:


Answer:
Use Spring Boot Developer Tools.

Adding Spring Boot Developer Tools to your project is very simple.

To use this annotation, apply it over class as below:


After this, Restart the application.


Answer:

  • spring-boot-maven-plugin provides a few commands which enable you to package the code as a jar or run the application

  • spring-boot: run runs your Spring Boot application.

  • spring-boot: repackage repackages your jar/war to be executable.

  • spring-boot: start and spring-boot:stop to manage the lifecycle of your Spring Boot application (i.e. for integration tests).

  • spring-boot: build-info generates build information that can be used by the Actuator.


Answer:
Spring Boot 2.0 requires Java 8 or later. Java 6 and 7 are no longer supported.


Answer:
Spring Boot aims to enable production ready applications in quick time. Spring Boot provides a few nonfunctional features out of the box like caching, logging, monitoring and embedded servers.

  • spring-boot-starter-actuator - To use advanced features like monitoring & tracing to your application out of the box

  • spring-boot-starter-undertow, spring-boot-starter-jetty, spring-boot-starter-tomcat - To pick your specific choice of Embedded Servlet Container

  • spring-boot-starter-logging - For Logging using logback

  • spring-boot-starter-cache - Enabling Spring Framework’s caching support


Answer:
Spring Boot also provides other starter projects including the typical dependencies to develop specific type of applications

  • spring-boot-starter-web-services - SOAP Web Services

  • spring-boot-starter-web - Web & RESTful applications

  • spring-boot-starter-test - Unit testing and Integration Testing

  • spring-boot-starter-jdbc - Traditional JDBC

  • spring-boot-starter-hateoas - Add HATEOAS features to your services

  • spring-boot-starter-security - Authentication and Authorization using Spring Security

  • spring-boot-starter-data-jpa - Spring Data JPA with Hibernate

  • spring-boot-starter-data-rest - Expose Simple REST Services using Spring Data REST