What are/do these dependencies?

Asked

Viewed 1,053 times

0

I started working with programming about three weeks ago, they gave me the code and I’m lost.

Until yesterday I only knew how to leave the Eclipse terminal, and now I have all these libraries (I think that’s the name) and I would like to know what they are and what they are for.

They were in the pom.xml file.

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

<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>

<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>

<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>

<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>

<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>

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

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

<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>

<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>

<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>

<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>

<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>

<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>

<groupId>junit</groupId>
<artifactId>junit</artifactId>

<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>

1 answer

1


These dependencies are nothing less than external libraries that the application will use.

For example, it seems that this application uses Spring Boot. Thus, it was necessary to add to the project the Spring Boot libraries and some others like the Mysql database connector, etc.

In Java you have the so-called native classes and interfaces, which are those available in JDK/JRE. But when using a framework like Spring, it is then necessary to add the classes/interfaces referring to Spring. And they are available through external libraries (dependencies).

  • But what about the other libraries? Like org.apache.Commons-commns.io or com.zaxxer-Hikaricp?

  • 1

    Each of them references something that will be used within the project. Sometimes too, a Spring library needs other external libraries that are not from Spring. For example the junit is for unit testing, jstl is for JSP pages, Hikaricp is a pool of connections to database, ... You would have to take their name and search on google to see exactly what each of them does.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.