Maven, get on with it

Time:2020-2-23

This paper takes spring MVC development as an example

POM

Project Object Model

Is an XML file, which can be configured to complete dependency management

Dependency managementDependency Management

Maven, get on with it
The figure includes:

  • A direct dependence
  • B. C indirect dependence
  • D. E delivery dependency

In a web project,/WEB-INF/libStore the jar package that the project depends on.
mavenstaypom.xmlConfigure dependencies, provide dependency management and delivery management, and automatically load required dependency packages.

Maven coordinatesCoordinates

Contain

  • groupId
  • artifactId
  • version
  • packaging(jar, war, POM object, can be omitted, default jar)

Maven installation and configuration

Windows:

  1. Download and unzip to your own installation directory
  2. To configureM2_HOME = Installation directory; addPATH = %M2_HOME%\bin;
  3. copy%M2_HOME%\conf\settings.xmlto%HOME%\.m2Folder, convenient for subsequent installation of other versions of Maven can also read the global configuration file
  4. modify%HOME%\.m2\settings.xmlMediumLocal warehouse storage locationAnd central warehouseMirror Address

Recommended Today

[Redis5 source code learning] analysis of the randomkey part of redis command

baiyan Command syntax Command meaning: randomly return a key from the currently selected databaseCommand format: RANDOMKEY Command actual combat: 127.0.0.1:6379> keys * 1) “kkk” 2) “key1” 127.0.0.1:6379> randomkey “key1” 127.0.0.1:6379> randomkey “kkk” Return value: random key; nil if database is empty Source code analysis Main process The processing function corresponding to the keys command is […]