You need add this dependency
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
then it will work.
More Related Contents:
- How do I tell Spring Boot which main class to use for the executable jar?
- java.lang.NoClassDefFoundError: org/springframework/core/env/ConfigurableEnvironment
- Configure active profile in SpringBoot via Maven
- Maven spring boot run debug with arguments
- Run Spring-boot’s main using IDE
- Maven Resource Filtering with Spring Boot: Could not resolve placeholder
- Spring Boot Configure and Use Two DataSources
- Filter invoke twice when register as Spring bean
- How can I log SQL statements in Spring Boot?
- Difference between @Mock, @MockBean and Mockito.mock()
- Spring Boot Adding Http Request Interceptors
- POSTing a @OneToMany sub-resource association in Spring Data REST
- Spring boot @ResponseBody doesn’t serialize entity id
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- Can a spring boot @RestController be enabled/disabled using properties?
- Is it possible with Spring Boot to serve up JSPs with a JAR packaging?
- How to disable ‘X-Frame-Options’ response header in Spring Security?
- How to configure embedded Tomcat integrated with Spring to listen requests to IP address, besides localhost?
- How to enable HTTP response caching in Spring Boot
- How to set spring active profiles with maven profiles
- How to reinitialize a Spring Bean?
- Java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException
- Multiple WebSecurityConfigurerAdapter in spring boot for multiple patterns
- Spring @ContextConfiguration how to put the right location for the xml
- java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.isInJavaLangAnnotationPackage(Ljava/lang/annotation/Annotation;)Z
- How to specify prefix for all controllers in Spring Boot?
- Spring Boot access static resources missing scr/main/resources
- bootstrap.yml configuration not processed anymore with Spring Cloud 2020.0
- How to modify request body before reaching controller in spring boot
- Spring Boot – Reading Text File using ResourceLoader