zoukankan      html  css  js  c++  java
  • Hibernate 系列教程2-创建maven工程

    第1步:通过eclipse新建1个java maven项目。

    选择file–>new–>other–>MAVEN PROJECT选项

    第2步:New Maven project
    选择模版:Artifact Id:maven-archetype-quickstart
    包名groupId:com.jege.hibernate
    工程/模块名称:Artifact Id:hibernate-single-table
    这里写图片描述

    第3步:修改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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.jege.hibernate</groupId>
        <artifactId>hibernate-single-table</artifactId>
        <version>0.0.1-SNAPSHOT</version>
        <packaging>jar</packaging>
    
        <name>hibernate-single-table</name>
        <url>http://maven.apache.org</url>
    
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <hibernate.version>4.3.8.Final</hibernate.version>
            <mysql.version>5.1.40</mysql.version>
            <junit.version>4.12</junit.version>
            <java.version>1.8</java.version>
        </properties>
    
        <dependencies>
    
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-core</artifactId>
                <version>${hibernate.version}</version>
            </dependency>
    
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>${mysql.version}</version>
            </dependency>
    
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
    
        </dependencies>
    
        <build>
            <finalName>hibernate-single-table</finalName>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </project>
    

    源码地址

    https://github.com/je-ge/hibernate

    如果觉得我的文章对您有帮助,请予以打赏。您的支持将鼓励我继续创作!谢谢!
    微信打赏
    支付宝打赏

  • 相关阅读:
    用laravel MaatwebsiteExcel 设置格式和导出
    PHP实现微信开放平台扫码登录源码(微信第三方登陆)
    oss存储前端直传向后台请求临时授权(下)
    小记
    String是个啥?
    ZAB协议
    基于Zookeeper实现客户端动态监听服务器上下线
    反射反射,程序员的快乐
    MapReduce工作流程及Shuffle原理概述
    自定义InputFormat
  • 原文地址:https://www.cnblogs.com/je-ge/p/6105433.html
Copyright © 2011-2022 走看看