1 Star 0 Fork 0

遇见1995 / jpademo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
README.md 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
chenlijian 提交于 2019-05-16 12:30 . Update README.md

jpademo

A JPA demo base on jdk1.8.

中文说明

how to use it

  1. fix the /src/main/resources/db.properties

use your username,password,dbURL.

jdbc.driver=com.mysql.cj.jdbc.Driver
jdbc.url=jdbc:mysql://xxx
jdbc.user=root
jdbc.password=root
  1. create the db table by /src/main/resources/empSys.sql

tips

may has those error

  • empService.findEmps() NullPointerException

This is because you are using the environment is greater than JDK 1.8, JDK1.8 only needs to be changed on the line.

  • java.lang.ClassNotFoundException: javax.xml.bind.JAXBException

This is because up of JDK 1.8 isn't container this Java EE jar.

And you can use the JDK 1.8 or Add these dependency.

<dependencies>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-core</artifactId>
        <version>2.3.0</version>
    </dependency>
    <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.1.1</version>
    </dependency>
</dependencies>
Java
1
https://gitee.com/yujian95/jpademo.git
git@gitee.com:yujian95/jpademo.git
yujian95
jpademo
jpademo
master

搜索帮助