Spring Bean Scopes Example

In this tutorial we will lean what is the significance of spring bean scopes. There are 5 types of scopes supported by spring Framework. singleton – Return a single bean instance per Spring IoC container prototype – Return a new bean instance each time when requested session – Return a single bean instance per HTTP […]

Hibernate: One To Many Example using Annotation

In this tutorial, you will learn how to work with one to many table relationship in Hibernate using Annotation. Tools & technologies used in this article: Java 1.6 Maven 3.2. Hibernate 4.x Oracle 11.2.0 Eclipse One-to-many relationship between TABLE A and TABLE B is as follows. Each row in a TABLE A is related to 0,1 […]

Hibernate: One To Many Example using XML mapping

In this tutorial, you will learn how to work with one to many table relationship in Hibernate using XML mapping. Tools & technologies used in this article: Java 1.6 Maven 3.2. Hibernate 4.x Oracle 11.2.0 Eclipse One-to-many relationship between TABLE A and TABLE B is as follows. Each row in a TABLE A is related […]

How To Load Multiple Spring Bean Configuration Files

In general in spring projects we need to maintain different modules and different bean configuration file for specific module for maintainability and easy to understand.Consider there are 5 modules in our project like module1 and module2….module5 and one common module , so we have Six config files. so we may write code like this to load […]

Spring Bean reference Example

In Spring, we can access beans i.e reference from the same or different bean configuration file, just have a look in to below scenarios. scenario 1: if the Bean is in different XML file If you are trying to access bean from different XML file, then we need to use ‘ref‘ tag with ‘bean‘ attribute. […]

String Concat Example in java

In Java , we can concat strings in few ways. please have a look in to the below example how can achieve that. Mainly 3 Ways we can concat strings in java, those are . 1. By using “+” operator 2. By Using concat() method. 3. By using StringBuffer’s append() method.   Example:

 OUT PUT:

[…]

Hibernate: One To One Example using Annotation

In this tutorial, you will learn how to work with one to one table relationship in Hibernate using Annotation. Tools & technologies used in this article: Java 1.6 Maven 3.2. Hibernate 4.x Oracle 11.2.0 Eclipse One-to-one relationship between TABLE A and TABLE B is as follows. Each row in a TABLE A is linked to 1 and […]

Hibernate: One To One Example using XML mapping

In this tutorial, you will learn how to work with one to one table relationship in Hibernate using XML mapping. Tools & technologies used in this article: Java 1.6 Maven 3.2. Hibernate 4.x Oracle 11.2.0 Eclipse One-to-one relationship between TABLE A and TABLE B is as follows. Each row in a TABLE A is linked to […]

CRUD (Create,Read,Update,Delete) operations using JPA 2.1 (Hibernate entity manager) + Maven 3.2.3 + Oracle 11.2

In this tutorial, we will explain how to make CRUD operations using JPA 2.1 (Hibernate entity manager) Tools & technologies used in this article: Java 1.6 Maven 3.2. Hibernate Entity manager 4.3.6 Oracle 11.2.0 Eclipse 1)  POM.xml Add Hibernate  entity manager 4.3.6 and Oracle 11.2.0 dependencies to the project.

 2)  Create  resources/META-INF folder under “src/main” […]