- Spring ORM 教程
- Spring ORM - 首页
- Spring ORM - 概述
- Spring ORM - 环境设置
- Spring ORM 与 Hibernate
- Spring ORM - 创建项目
- Spring ORM - Maven Hibernate
- Spring ORM - 持久化 Hibernate
- Spring ORM - 更新项目
- Spring ORM - 运行及测试 Hibernate
- Spring ORM 与 EclipseLink
- Spring ORM - Maven EclipseLink
- Spring ORM - 持久化 EclipseLink
- Spring ORM - 更新项目 EclipseLink
- Spring ORM - 运行及测试 EclipseLink
- Spring ORM 实用资源
- Spring ORM - 快速指南
- Spring ORM - 实用资源
- Spring ORM - 探讨
Spring ORM - Maven EclipseLink
让我们在 pom.xml 中添加以下依赖。
Spring 框架
EclipseLink
MySQL 连接器
其他相关依赖。
根据以下内容更新 pom.xml。
pom.xml
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.tutorialspoint</groupId> <artifactId>springorm</artifactId> <version>0.0.1-SNAPSHOT</version> <name>Spring ORM</name> <description>Spring ORM Test Project</description> <properties> <org.springframework.version>4.3.7.RELEASE</org.springframework.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${org.springframework.version}</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-orm</artifactId> <version>${org.springframework.version}</version> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>eclipselink</artifactId> <version>2.5.1</version> </dependency> <dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>javax.persistence</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>javax.transaction</groupId> <artifactId>javax.transaction-api</artifactId> <version>1.3</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-dbcp2</artifactId> <version>2.1.1</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> <version>8.0.13</version> </dependency> <dependency> <groupId>com.sun.activation</groupId> <artifactId>javax.activation</artifactId> <version>1.2.0</version> </dependency> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency> <dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>2.3.1</version> <scope>runtime</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> </plugins> </build> </project>
现在右键单击项目名称。选择Maven → 更新项目以下载所需的依赖。
广告