Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

Making a sample RESTapplication executable

Pragya Keshap answered on February 19, 2023 Popularity 1/10 Helpfulness 1/10

Contents


More Related Answers

  • .rest file example
  • Create rest endpoint
  • Create REST APIs

  • Making a sample RESTapplication executable

    0

    Create a RestSampleApp class using the SpringBootApplication annotation. The main() method uses Spring Boot's SpringApplication.run() method to launch an application.

    We will annotate the RestSampleApp class with the @SpringBootApplication annotation that adds all of the following tags implicitly:

    The @Configuration annotation tags the class as a source of bean definitions for the application context.

    The @EnableAutoConfiguration annotation indicates that Spring Boot is to start adding beans based on classpath settings, other beans, and various property settings.

    The @EnableWebMvc annotation is added if Spring Boot finds spring-webmvc on the classpath. It treats the application as a web application and activates key behaviors, such as setting up DispatcherServlet.

    The @ComponentScan annotation tells Spring to look for other components, configurations, and services in the given package:

    Popularity 1/10 Helpfulness 1/10 Language java
    Source: Grepper
    Link to this answer
    Share Copy Link
    Contributed on Feb 19 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.