项目作者: motaharinia
项目描述 :
spring-boot data JPA hibernate ORM and h2 database
高级语言: Java
项目地址: git://github.com/motaharinia/springboot-datajpah2.git
Spring Boot Data with JPA-Hibernate ORM and H2 Database
Spring Data JPA:
Spring Data JPA, part of the larger Spring Data family, makes it easy to easily implement JPA based repositories. This module deals with enhanced support for JPA based data access layers. It makes it easier to build Spring-powered applications that use data access technologies.
JPA (Java Persistence API):
JPA is not a tool or framework; rather, it defines a set of concepts that can be implemented by any tool or framework. While JPA’s object-relational mapping (ORM) model was originally based on Hibernate, it has since evolved. Likewise, while JPA was originally intended for use with relational/SQL databases, some JPA implementations have been extended for use with NoSQL datastores. A popular framework that supports JPA with NoSQL is EclipseLink,
Hibernate ORM:
Hibernate ORM is an object-relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database
H2 Database:
H2 is the Java SQL database
- Very fast, open source, JDBC API
- Embedded and server modes; in-memory databases
- Browser based Console application
- Small footprint: around 2 MB jar file size
further references:
Project Descriptions :
please see application.properties files in resources folder and select a active profile “dev” or “com” to run project. you can check test methods too.
to manage embedded h2 database open http://localhost:8080/h2-console/ with
- username:sa
- password: (blank password)
- datasourceUrl: jdbc
mem:motahariniadb’
IntellliJ IDEA Configurations :
- IntelijIDEA: Help -> Edit Custom Vm Options -> add these two line:
- -Dfile.encoding=UTF-8
- -Dconsole.encoding=UTF-8
- IntelijIDEA: File -> Settings -> Editor -> File Encodings-> Project Encoding: form “System default” to UTF-8. May be it affected somehow.
- IntelijIDEA: File -> Settings -> Editor -> General -> Code Completion -> check “show the documentation popup in 500 ms”
- IntelijIDEA: File -> Settings -> Editor -> General -> Auto Import -> check “Optimize imports on the fly (for current project)”
- IntelijIDEA: File -> Settings -> Editor -> Color Scheme -> Color Scheme Font -> Scheme: Default -> uncheck “Show only monospaced fonts” and set font to “Tahoma”
- IntelijIDEA: Run -> Edit Configuration -> Spring Boot -> XXXApplication -> Configuration -> Environment -> VM Options: -Dspring.profiles.active=dev
- IntelijIDEA: Run -> Edit Configuration -> Spring Boot -> XXXApplication -> Code Coverage -> Fix the package in include box