Based on these spring boot provides auto

Info icon This preview shows pages 126–141. Sign up to view the full content.

Based on these, Spring Boot provides Auto Configuration.
Image of page 126

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Questions What is the importance of @SpringBootApplication?
Image of page 127
SpringBootApplication @SpringBootConfiguration @EnableAutoConfiguration @ComponentScan public @interface SpringBootApplication {
Image of page 128

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Questions What is Auto Configuration? How can we find more information about Auto Configuration?
Image of page 129
Spring Boot looks at a) Frameworks available on the CLASSPATH b) Existing configuration for the application. Based on these, Spring Boot provides basic configuration needed to configure the application with these frameworks. This is called Auto Configuration.
Image of page 130

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Application Startup Log Mapping servlet: 'dispatcherServlet' to [/] Mapped "{[/error]}" onto public org.springframework.http.Respo <java.util.Map<java.lang. String , java.lang. Object >> org.spring BasicErrorController. error (javax.servlet.http.HttpServletReque Mapped URL path [/webjars/ * *] onto handler of type [ class org.springframework.web.servlet.resource.ResourceHttpRe
Image of page 131
Implementation spring-boot-autoconfigure.jar To get more details Turn on Debug logging logging.level.org.springframework: DEBUG Use Spring Boot Actuator
Image of page 132

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Questions What is an embedded server? Why is it important? What is the default embedded server with Spring Boot? What are the other embedded servers supported by Spring Boot?
Image of page 133
Embedded Server Server is embedded as part of the deployable - jar. Removes the need to have the server pre-installed on the deployment environment. Default is Tomcat. Spring Boot also supports Jetty and UnderTow.
Image of page 134

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Switching to Jetty <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-web </artifactId> <exclusions> <exclusion> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-tomcat </artifactId </exclusion> </exclusions> </dependency> <dependency> <groupId> org.springframework.boot </groupId> <artifactId> spring-boot-starter-jetty </artifactId> </dependency>
Image of page 135
Questions What are Starter Projects? Can you give examples of important starter projects?
Image of page 136

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Spring Boot Documentation Starters are a set of convenient dependency descriptors that you can include in your application. You get a one-stop-shop for all the Spring and related technology that you need, without having to hunt through sample code and copy paste loads of dependency descriptors.
Image of page 137
Spring Boot Documentation For example, if you want to get started using Spring and JPA for database access, just include the spring-boot- starter-data-jpa dependency in your project, and you are good to go.
Image of page 138

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Starters spring-boot-starter-web-services - SOAP WebServices spring-boot-starter-web - Web & RESTful applications spring-boot-starter-test - Unit, Integration Testing spring-boot-starter-jdbc - Traditional JDBC spring-boot-starter-hateoas - HATEOAS features
Image of page 139
Starters spring-boot-starter-security - Authentication and Authorization using Spring Security spring-boot-starter-data-jpa - Spring Data JPA with Hibernate spring-boot-starter-cache - Enabling Spring Framework’s caching support spring-boot-starter-data-rest - Expose Simple REST Services using Spring Data REST
Image of page 140

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 141
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '18
  • LN Rao
  • public class, Spring Framework, Spring Boot, Spring Security

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern