user8565199
user8565199

Reputation: 133

How can I know a Java project is Spring based or Spring MVC based or Spring xxx?

I had a Java project. But I cannot tell it is Spring based or Spring MVC based, or Spring xxx? How can I know that? The reason why I ask this is that I can refer to Spring tutorial or Spring MVC tutorial or Spring xxx if I know that. Please help. Thanks.

Upvotes: 4

Views: 8455

Answers (3)

Rajesh Katadi
Rajesh Katadi

Reputation: 144

To checkout whether it is Spring based or Spring WebMVC please follow below steps :

1.Go through the gradle properties file or maven pom file to look out for the dependencies if you are using maven or gradle as build tool .(If not (I would suggest you to do so its makes life easy) then go through the lib folder of your project )

2.Even if dependencies are there please look out for the classes which annotation are used there . For example if you find @RestController or @Controller then it is a spring WebMVC (org.springframework.web.*) project .There may be chances someone has included the dependencies but have not used :P

Please revert me back if you have any doubt

Thanks Rajesh

Upvotes: 0

RidwanulHaque
RidwanulHaque

Reputation: 57

If in the DefaultConfig class there is @EnableWebMvcannotation then the project is a spring mvc project.

Upvotes: 0

Gurpreet Kaur
Gurpreet Kaur

Reputation: 48

Spring is a framework which helps to connect different components together. There are many modules for IOC, AOP, Web MVC etc.Spring Framework is an open source application framework and inversion of control container for the Java platform.

Spring MVC (Model–view–controller) is one component within the whole Spring Framework, to support development of web applications.

If your project is maven based than below dependency will be present in pom.xml

<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring-webmvc</artifactId>
  <version>${spring.version}</version>
</dependency>

Upvotes: 1

Related Questions