Why I need to include spring-context
in my new spring boot
project to work ?
I have this in my pom.xml
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
I can see inside spring-web dependency, the dependency spring-context
if I remove spring-context from my pom.xml, the application does not run.
Below is the error I get :
Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nameOfController'