{"id":85715,"date":"2019-01-08T13:00:45","date_gmt":"2019-01-08T11:00:45","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=85715"},"modified":"2019-01-07T15:52:14","modified_gmt":"2019-01-07T13:52:14","slug":"spring-boot-hibernate-tips","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html","title":{"rendered":"Spring Boot Hibernate Tips"},"content":{"rendered":"<h2 class=\"wp-block-heading\" id=\"1-overview\">1. Overview<\/h2>\n<p>Hibernate needs no introduction. It is the most popular ORM out there for Java.<\/p>\n<p>Similarly, Spring Boot is the most powerful, and easy to use framework out there for Java.<\/p>\n<p>This tutorial isn\u2019t about Hibernate or Spring Boot, there are tons of them out there.<\/p>\n<p>We\u2019ll look into some common errors that you may run into when using them together and how to fix them.<\/p>\n<h2 class=\"wp-block-heading\" id=\"2-dependencies\">2. Dependencies<\/h2>\n<p>We\u2019ll use Gradle to build our project. I recommend using&nbsp;<a href=\"http:\/\/start.spring.io\/\">Spring Initializr<\/a>&nbsp;for bootstrapping your project.<\/p>\n<p>We\u2019ll use:<\/p>\n<ul class=\"wp-block-list\">\n<li>Spring Boot 2<\/li>\n<li>Spring Webflux<\/li>\n<li>Spring Data JPA<\/li>\n<li>Spring Data Envers<\/li>\n<li>Jackson Annotations<\/li>\n<li>Jackson DataType Hibernate<\/li>\n<li>H2 Database<\/li>\n<li>Lombok<\/li>\n<\/ul>\n<p>Spring Data Envers allows us to access entity revisions managed by Hibernate Envers.<\/p>\n<p>Jackson Annotations will help us to avoid the common Stack Overflow errors that are caused by JPA relationships.<\/p>\n<p>Jackson DataType Hibernate Module will help with Hibernate types and lazy-loading aspects.<\/p>\n<p>We\u2019ll look into all of these in a while.<\/p>\n<pre class=\"brush:java\">buildscript {\n    ext {\n        springBootVersion = '2.0.6.RELEASE'\n    }\n...\n}\n\ndependencies {\n    implementation('org.springframework.boot:spring-boot-starter-data-jpa')\n    implementation('org.springframework.boot:spring-boot-starter-webflux')\n    implementation(\"org.springframework.data:spring-data-envers\")\n    implementation(\"com.fasterxml.jackson.core:jackson-annotations:2.9.7\")\n    implementation(\"com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:2.9.7\")\n    runtimeOnly('com.h2database:h2')\n    compileOnly('org.projectlombok:lombok')\n...\n}\n<\/pre>\n<p>We\u2019ll use H2 to run our project.<\/p>\n<h2 id=\"3-entities\">3. Entities<\/h2>\n<p>In this example, we\u2019ll use JPA to create universities and students.<\/p>\n<p>It\u2019s always a good idea to store common logic &amp; properties in a superclass.<\/p>\n<p>We will create a superclass for our entities and store common properties in it.<\/p>\n<p>Let\u2019s have a look at our BaseEntity class.<\/p>\n<pre class=\"brush:java\">@Getter @Setter @NoArgsConstructor @AllArgsConstructor @FieldDefaults(level = AccessLevel.PRIVATE)\n@MappedSuperclass\n@EntityListeners({AuditingEntityListener.class})\n@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = \"id\")\npublic abstract class BaseEntity {\n    @Id\n    @GeneratedValue\n    Long id;\n\n    @CreatedDate\n    LocalDateTime createdAt;\n    @LastModifiedDate\n    LocalDateTime updatedAt;\n}\n<\/pre>\n<p>One thing you can notice is that I haven\u2019t used the\u00a0<code class=\"highlighter-rouge\">@Data<\/code>\u00a0annotation from Lombok on our class.\u00a0<code class=\"highlighter-rouge\">@Data<\/code>\u00a0annotation automatically adds\u00a0<code class=\"highlighter-rouge\">@ToString<\/code>\u00a0annotation which may cause Stack Overflow errors. Hence it\u2019s better to manage the annotations manually.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><code class=\"highlighter-rouge\">@MappedSuperclass<\/code>\u00a0annotation allows entities to inherit properties from a base class. This annotation is very important if you want to inherit properties from a base class.<\/p>\n<p><code class=\"highlighter-rouge\">@EntityListeners({AuditingEntityListener.class})<\/code>\u00a0enables Auditing. We are using\u00a0<code class=\"highlighter-rouge\">@CreatedDate<\/code>\u00a0&amp;\u00a0<code class=\"highlighter-rouge\">@LastModifiedDate<\/code>\u00a0to capture when the entity was created or modified. This will be taken care by Spring Data JPA.<\/p>\n<p><code class=\"highlighter-rouge\">@JsonIdentityInfo<\/code>\u00a0will avoid the Stack Overflow errors when converting our entities to JSON.<br \/>This annotation is required to break the infinite cycle due to the bi-directional relationships between our entities.<\/p>\n<p>You may also want to check out\u00a0<code class=\"highlighter-rouge\">@JsonBackReference<\/code>\u00a0&amp;\u00a0<code class=\"highlighter-rouge\">@JsonManagedReference<\/code>\u00a0to see if they fit better with your requirements.<\/p>\n<p>Let\u2019s have a look at our University &amp; Student entities.<\/p>\n<pre class=\"brush:java\">@Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder @FieldDefaults(level = AccessLevel.PRIVATE)\n@Entity @Audited\npublic class Student extends BaseEntity{\n    String name;\n    @ManyToOne\n    University university;\n}\n<\/pre>\n<pre class=\"brush:java\">@Getter @Setter @NoArgsConstructor @AllArgsConstructor @Builder @FieldDefaults(level = AccessLevel.PRIVATE)\n@Entity @Audited\npublic class University extends BaseEntity{\n    String name;\n    String city;\n    @OneToMany(mappedBy = \"university\")\n    Set&lt;Student&gt; students = new HashSet&lt;&gt;();\n}\n<\/pre>\n<p><code class=\"highlighter-rouge\">@Audited<\/code>\u00a0will enable Hibernate managing the auditing (tracking changes) on that Entity.<\/p>\n<h2 id=\"4-configuration\">4. Configuration<\/h2>\n<p>Let\u2019s check the configurations required to run our project.<\/p>\n<h3 id=\"41-hibernate-jackson-module\">4.1. Hibernate Jackson Module<\/h3>\n<pre class=\"brush:java\">@Bean\npublic Module hibernateModule(){\n    return new Hibernate5Module();\n}\n<\/pre>\n<p>We are registering a new Jackson Module.\u00a0<br \/>Spring Boot will auto-detect it and register it to the\u00a0<code class=\"highlighter-rouge\">ObjectMapper<\/code>bean.<\/p>\n<h3 id=\"42-hibernate-envers\">4.2. Hibernate Envers<\/h3>\n<p>To enable Envers auditing, we have to extend our Repositories with\u00a0<code class=\"highlighter-rouge\">RevisionRepository<\/code>.<\/p>\n<p>Let\u2019s have a look at our\u00a0<code class=\"highlighter-rouge\">UniversityRepository<\/code>.<\/p>\n<pre class=\"brush:java; wrap-lines:false\">public interface UniversityRepository extends RevisionRepository&lt;University, Long, Long&gt;, JpaRepository&lt;University,Long&gt; {\n}\n<\/pre>\n<p>We\u2019ll have to similarly do this for our\u00a0<code class=\"highlighter-rouge\">StudentRepository<\/code>.<\/p>\n<pre class=\"brush:java; wrap-lines:false\">public interface StudentRepository extends RevisionRepository&lt;Student, Long, Long&gt;, JpaRepository&lt;Student,Long&gt; {\n}\n<\/pre>\n<p>We also have to annotate our main class with\u00a0<code class=\"highlighter-rouge\">@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)<\/code>.<\/p>\n<p>We\u2019ll look at the main class in a while after going through other annotations that we need.<\/p>\n<h3 id=\"43-spring-data-auditing\">4.3. Spring Data Auditing<\/h3>\n<p>To enable this, we\u2019ll have to annotate our main class with\u00a0<code class=\"highlighter-rouge\">@EnableJpaAuditing<\/code>.<\/p>\n<p>Let\u2019s look at it.<\/p>\n<pre class=\"brush:java; wrap-lines:false\">@SpringBootApplication\n@EnableJpaAuditing\n@EnableJpaRepositories(repositoryFactoryBeanClass = EnversRevisionRepositoryFactoryBean.class)\npublic class HibernateTipsApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(HibernateTipsApplication.class, args);\n    }\n}\n<\/pre>\n<h2 id=\"5-conclusion\">5. Conclusion<\/h2>\n<p>I have tried explaining, with a simple example, how to create REST applications using Spring Boot &amp; Hibernate.<\/p>\n<p>This might solve some of your Stack Overflow errors.<br \/>Else, you might want to consider writing your own Data Transfer Objects (DTO).<\/p>\n<p>If you need support for data types that aren\u2019t supported by the core Hibernate ORM, you might want to check out this\u00a0<a href=\"https:\/\/github.com\/vladmihalcea\/hibernate-types\">library<\/a>.<\/p>\n<p>You can read more about:<\/p>\n<ul>\n<li><a href=\"https:\/\/docs.spring.io\/spring-data\/jpa\/docs\/current\/reference\/html\/\">Spring Data JPA<\/a><\/li>\n<\/ul>\n<p>You can find the complete example on\u00a0<a href=\"https:\/\/github.com\/mohitsinha\/tutorials\/tree\/master\/hibernate-tips\">Github<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Overview Hibernate needs no introduction. It is the most popular ORM out there for Java. Similarly, Spring Boot is the most powerful, and easy to use framework out there for Java. This tutorial isn\u2019t about Hibernate or Spring Boot, there are tons of them out there. We\u2019ll look into some common errors that you &hellip;<\/p>\n","protected":false},"author":8695,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[971,30,854],"class_list":["post-85715","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-hibernate","tag-spring","tag-spring-boot"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring Boot Hibernate Tips - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring Boot Hibernate Tips - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2019-01-08T11:00:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Mohit sinha\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mohit sinha\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html\"},\"author\":{\"name\":\"Mohit sinha\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ff8221b0c25d3b4386e4815719dddabf\"},\"headline\":\"Spring Boot Hibernate Tips\",\"datePublished\":\"2019-01-08T11:00:45+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html\"},\"wordCount\":568,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Hibernate\",\"Spring\",\"Spring Boot\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html\",\"name\":\"Spring Boot Hibernate Tips - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2019-01-08T11:00:45+00:00\",\"description\":\"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2019\\\/01\\\/spring-boot-hibernate-tips.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring Boot Hibernate Tips\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/ff8221b0c25d3b4386e4815719dddabf\",\"name\":\"Mohit sinha\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g\",\"caption\":\"Mohit sinha\"},\"description\":\"Mohit Sinha is a Software Developer at Turtlemint, where he focuses mostly on the back-end. Prior to that he has worked on different types of projects which enhanced his skill-set in different ways. He enjoys writing about things he learns. He constantly searches for ways to create better software &amp; applications.\",\"sameAs\":[\"http:\\\/\\\/sinhamohit.com\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sinhamohit\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/mohit-sinha\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring Boot Hibernate Tips - Java Code Geeks","description":"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html","og_locale":"en_US","og_type":"article","og_title":"Spring Boot Hibernate Tips - Java Code Geeks","og_description":"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips","og_url":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2019-01-08T11:00:45+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Mohit sinha","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Mohit sinha","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html"},"author":{"name":"Mohit sinha","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ff8221b0c25d3b4386e4815719dddabf"},"headline":"Spring Boot Hibernate Tips","datePublished":"2019-01-08T11:00:45+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html"},"wordCount":568,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Hibernate","Spring","Spring Boot"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html","url":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html","name":"Spring Boot Hibernate Tips - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2019-01-08T11:00:45+00:00","description":"Interested to learn about Hibernate Tips? Check our article presenting thouroughly some Spring Boot framework Hibernate Tips","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2019\/01\/spring-boot-hibernate-tips.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring Boot Hibernate Tips"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/ff8221b0c25d3b4386e4815719dddabf","name":"Mohit sinha","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed20d687041a002ed3ade1b9be16d1f03943f1a93750d0ded7df6e00edb27465?s=96&d=mm&r=g","caption":"Mohit sinha"},"description":"Mohit Sinha is a Software Developer at Turtlemint, where he focuses mostly on the back-end. Prior to that he has worked on different types of projects which enhanced his skill-set in different ways. He enjoys writing about things he learns. He constantly searches for ways to create better software &amp; applications.","sameAs":["http:\/\/sinhamohit.com\/","https:\/\/www.linkedin.com\/in\/sinhamohit\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/mohit-sinha"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/85715","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/8695"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=85715"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/85715\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=85715"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=85715"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=85715"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}