what are the frameworks-dependencies in spring [closed]

3
  

what is the dependency of @services

     

what is the dependency of @repositories

     

what is the dependency of @controllers

I mean dependencies in the pom.xml file

If I'm not wrong @controllers has the dependency

  

starter.web

and what are the dependencies for repositories and services?

    
asked by deluf 28.04.2017 в 02:40
source

2 answers

2

Within the dependency spring-boot-starter-web is the dependency spring-context which contains @Service, @Repository, @Controller among others.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

This is the dependency tree:

    
answered by 28.04.2017 / 03:13
source
0

Being more accurate, @Controller corresponds to Spring MVC, and it marks a Controller that can be "scanned" to respond to requests that you can name with the @RequestMapping annotation.

Answering your question, if you mean @Service @Controller and @Repository correspond to spring-context.

If you run the mvn dependency: tree command, you can see which artifact is incorporating spring-context, as well as the version.

    
answered by 28.04.2017 в 03:14