本文主要是介绍学习spring、springmvc、mybatis、ssm所有可能用到的依赖总结,父工程pom文件依赖,<packaging>pom</packaging>,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1、父工程pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"><modelVersion>4.0.0</modelVersion><groupId>com.atguigu</groupId><artifactId>pro-ssm</artifactId><version>1.0-SNAPSHOT</version><packaging>pom</packaging><modules><module>pro04-spring-ioc-xml</module><module>pro00-spring-handwrite</module><module>pro05-spring-ioc-annotation</module><module>pro07-proxy-static</module><module>pro10-spring-aop-annoation</module><module>pro12-spring-jdbc-template</module><module>pro13-spring-transaction-annotation</module><module>pro14-springmvc-begin</module><module>pro15-springmvc-jsp</module><module>pro15-springmvc-rest</module><module>pro16-springmvc-schedule</module><module>pro17-springmvc-validator</module><module>pro18-mybatis-begin</module><module>pro24-schedule-ssm</module></modules><properties><maven.compiler.source>17</maven.compiler.source><maven.compiler.target>17</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><spring.version>6.0.6</spring.version><junit.version>5.3.1</junit.version><lombok.version>1.18.20</lombok.version><mysql.version>8.0.25</mysql.version><druid.version>1.2.8</druid.version><logback.version>1.2.3</logback.version><jakarta.version>9.1.0</jakarta.version><jackson.version>2.15.0</jackson.version><hibernate.validator.version>8.0.0.Final</hibernate.validator.version><fileupload.version>1.3.1</fileupload.version><mybatis.version>3.5.11</mybatis.version><mybatis-spring.version>3.0.2</mybatis-spring.version><pagehelper.version>5.1.11</pagehelper.version></properties><dependencyManagement><dependencies><dependency><groupId>org.springframework</groupId><artifactId>spring-context</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>${lombok.version}</version></dependency><dependency><groupId>org.junit.jupiter</groupId><artifactId>junit-jupiter-api</artifactId><version>${junit.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-test</artifactId><version>${spring.version}</version><scope>test</scope></dependency><dependency><groupId>jakarta.annotation</groupId><artifactId>jakarta.annotation-api</artifactId><version>2.1.1</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-aop</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-aspects</artifactId><version>${spring.version}</version></dependency><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId><version>${mysql.version}</version></dependency><dependency><groupId>com.alibaba</groupId><artifactId>druid</artifactId><version>${druid.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-jdbc</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-tx</artifactId><version>${spring.version}</version></dependency><dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>${spring.version}</version></dependency><dependency><groupId>ch.qos.logback</groupId><artifactId>logback-classic</artifactId><version>${logback.version}</version></dependency><dependency><groupId>jakarta.platform</groupId><artifactId>jakarta.jakartaee-web-api</artifactId><version>${jakarta.version}</version><scope>provided</scope></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson.version}</version></dependency><!-- 校验注解实现--><dependency><groupId>org.hibernate.validator</groupId><artifactId>hibernate-validator</artifactId><version>${hibernate.validator.version}</version></dependency><dependency><groupId>org.hibernate.validator</groupId><artifactId>hibernate-validator-annotation-processor</artifactId><version>${hibernate.validator.version}</version></dependency><dependency><groupId>commons-fileupload</groupId><artifactId>commons-fileupload</artifactId><version>${fileupload.version}</version></dependency><!-- mybatis依赖 --><dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId><version>${mybatis.version}</version></dependency><dependency><groupId>org.mybatis</groupId><artifactId>mybatis-spring</artifactId><version>${mybatis-spring.version}</version></dependency><dependency><groupId>com.github.pagehelper</groupId><artifactId>pagehelper</artifactId><version>${pagehelper.version}</version></dependency></dependencies></dependencyManagement></project>
2、<packaging>pom</packaging>
<packaging>pom</packaging> 是一个标签,用于指定项目打包方式为Maven的POM(Project Object Model)文件。它表明该项目的构建和打包方式是由Maven来管理的。
在Maven中,POM文件是项目的基本单位,包含了项目的配置信息、依赖关系、构建脚本等。通过使用<packaging>pom</packaging>标签,可以告诉Maven该项目的构建和打包过程是由POM文件来定义的。
通常,一个Maven项目会有一个名为pom.xml的文件,其中包含了项目的POM信息。这个文件是Maven项目构建和打包的基础,通过在POM文件中配置各种元素和插件,可以控制项目的构建流程、依赖管理、打包方式等。
总之,<packaging>pom</packaging>标签用于指定项目打包方式为Maven的POM文件,以告诉Maven使用POM文件来管理项目的构建和打包过程。
`<packaging>pom</packaging>`用于指定 Maven POM 项目的打包类型。它表示该项目是一个父模块项目,其中包含可被子模块继承的公共配置、依赖和插件。此类项目不会生成可执行的构件(例如,jar、war),而是作为管理多个项目共享配置和依赖项的中心点。
3、maven官网
https://maven.apache.org/what-is-maven.html
这篇关于学习spring、springmvc、mybatis、ssm所有可能用到的依赖总结,父工程pom文件依赖,<packaging>pom</packaging>的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!