File tree Expand file tree Collapse file tree 6 files changed +105
-0
lines changed
Expand file tree Collapse file tree 6 files changed +105
-0
lines changed Original file line number Diff line number Diff line change 1+ # Gradle
2+ # ------
3+ .gradle
4+ /build
5+ /buildSrc /build
6+ /subprojects /* /build
7+ /subprojects /docs /src /samples /* /* /build
8+
9+ # IDEA
10+ # ----
11+ .idea
12+ .shelf
13+ /* .iml
14+ /* .ipr
15+ /* .iws
16+ /buildSrc /* .iml
17+ /buildSrc /* .ipr
18+ /buildSrc /* .iws
19+ /buildSrc /out
20+ /out
21+ /subprojects /* /* .iml
22+ /subprojects /* /out
Original file line number Diff line number Diff line change 1+ # Copyright 2016 The Cockroach Authors.
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
12+ # implied. See the License for the specific language governing
13+ # permissions and limitations under the License. See the AUTHORS file
14+ # for names of contributors.
15+ #
16+ # Author: Nathan VanBenschoten ([email protected] )17+
18+ .PHONY : start
19+ start :
20+ @gradle run
Original file line number Diff line number Diff line change 1+ group ' com.cockroachlabs'
2+ version ' 1.0'
3+
4+ apply plugin : ' java'
5+ apply plugin : ' application'
6+
7+ mainClassName = ' com.cockroachlabs.Application'
8+ sourceCompatibility = 1.7
9+
10+ repositories {
11+ mavenCentral()
12+ }
13+
14+ dependencies {
15+ compile ' org.hibernate:hibernate-core:5.2.0.Final'
16+ compile ' org.postgresql:postgresql:9.4.1208'
17+
18+ testCompile group : ' junit' , name : ' junit' , version : ' 4.11'
19+ }
Original file line number Diff line number Diff line change 1+ rootProject. name = ' Hibernate'
2+
Original file line number Diff line number Diff line change 1+ package com .cockroachlabs ;
2+
3+ public class Application {
4+
5+ public static void main (String [] args ) {
6+
7+ }
8+
9+ }
Original file line number Diff line number Diff line change 1+ <?xml version =' 1.0' encoding =' utf-8' ?>
2+ <!DOCTYPE hibernate-configuration PUBLIC
3+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
4+ "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
5+
6+ <hibernate-configuration >
7+
8+ <session-factory >
9+
10+ <!-- Database connection settings -->
11+ <property name =" connection.driver_class" >org.postgresql.Driver</property >
12+ <property name =" connection.url" >jdbc:postgresql://127.0.0.1:26257/company?sslmode=disable</property >
13+ <property name =" connection.username" >root</property >
14+ <property name =" connection.password" ></property >
15+
16+ <!-- JDBC connection pool (use the built-in) -->
17+ <property name =" connection.pool_size" >1</property >
18+
19+ <!-- SQL dialect -->
20+ <property name =" dialect" >org.hibernate.dialect.PostgreSQL94Dialect</property >
21+
22+ <!-- Echo all executed SQL to stdout -->
23+ <property name =" show_sql" >true</property >
24+
25+ <!-- Drop and re-create the database schema on startup -->
26+ <property name =" hbm2ddl.auto" >validate</property >
27+
28+ <!-- org.hibernate.HibernateException: No CurrentSessionContext configured! -->
29+ <property name =" hibernate.current_session_context_class" >thread</property >
30+
31+ </session-factory >
32+
33+ </hibernate-configuration >
You can’t perform that action at this time.
0 commit comments