在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:hibernate_old1开源软件地址:https://gitee.com/mirrors/hibernate开源软件介绍:Hibernate ORM is a library providing Object/Relational Mapping (ORM) supportto applications, libraries, and frameworks. It also provides an implementation of the JPA specification, which is the standard Java specification for ORM. This is the repository of its source code; see Hibernate.org for additional information. Continuous IntegrationHibernate uses both Jenkins and GitHub Actionsfor its CI needs. See Building from sourcesThe build requires at least Java 11 JDK. Hibernate uses Gradle as its build tool. See the Gradle Primer section below if you are new toGradle. Contributors should read the Contributing Guide. Gradle PrimerThe Gradle build tool has amazing documentation. 2 in particular that are indispensable:
We will cover the basics developers and contributors new to Gradle need to know to get productive quickly.
Executing TasksGradle uses the concept of build tasks (equivalent to Ant targets or Maven phases/goals). You can get a list ofavailable tasks via gradle tasks To execute a task across all modules, simply perform that task from the root directory. Gradle will visit eachsub-project and execute that task if the sub-project defines it. To execute a task in a specific module you caneither:
Common tasksThe common tasks you might use in building Hibernate include:
Testing and databasesTesting against a specific database can be achieved in 2 different ways: Using "profiles"The Hibernate build defines several database testing "profiles" in gradle clean build -Pdb=pgsql To run a test from your IDE, you need to ensure the property expansions happen.Use the following command: gradle clean compile -Pdb=pgsql NOTE: If you are running tests against a JDBC driver that is not available via Maven central be sure toadd these drivers to your local Maven repo cache (~/.m2/repository) or (better) add it to a personal Maven repo server Running database-specific tests from the IDE using "profiles"You can run any test on any particular database that is configured in a All you have to do is run the following command: ./gradlew setDataBase -Pdb=pgsql or you can use the shortcut version: ./gradlew sDB -Pdb=pgsql You can do this from the module which you are interested in testing or from the Afterward, just pick any test from the IDE and run it as usual. Hibernate will pick the database configuration from the Starting test databases locally as docker containersYou don’t have to install all databases locally to be able to test against them in case you have docker available.The script All you have to do is run the following command: ./docker_db.sh postgresql_9_5 omitting the argument will print a list of possible options. When the database is properly started, you can run tests with special profiles that are suffixed with The command for running tests could look like the following: ./gradlew test -Pdb=pgsql_ci "-DdbHost=192.168.99.100" The following table illustrates a list of commands for various databases that can be tested locally.
|
请发表评论