Submitted by heartin on Thu, 06/02/2016 - 20:06
You need to install the version of Git for your system first before getting started. You can download Git for Windows from https://git-for-windows.github.io. A simple Google search will help you install Git.
This is the most important prerequisite for using git in your machine.
You can use various free GUI tools such as Tortoise Git or SourceTree for working with Git easily.
We will see more about these later, if you face any doubt, please ask.
Submitted by heartin on Sat, 05/14/2016 - 13:13
@Profile annotation allow you to register components that will be selected only if its associated profile is active. You can selectively activate a set of beans in a class or all beans .
We will see how to do this using a Java configuration file using the @Profile annotation, and then we will also discuss about how to do it using XML configuration.
Important points about Spring Profiles
Submitted by heartin on Sat, 05/14/2016 - 09:07
We will create a simple class, configure it and test it. You can configure a Spring application through xml, or Java configuration or annotations along with xml or java configuration. In this example we will use @Component and @ComponentScan annotations along with Java configuration. Note that these annotations can also be used along with xml configuration and we will see how to do that in the end.
Submitted by heartin on Sat, 05/14/2016 - 04:37
We will create a simple class, configure it and test it. You can configure a Spring application through xml, or Java configuration or annotations along with xml or java configuration. In this example, we will see java configuration approach. We will have a Java class annotated with @Configuration to hold bean configuration.
Submitted by heartin on Fri, 05/13/2016 - 20:31
Please follow the below guidelines for answering questions.
Answer within the question bank itself, without changing the name.
Color your answers with blue color.
Color your execution results in yellow color. Sometimes you might be asked to first answer without trying out and then actually try compiling/executing it. This step is not mandatory.
Submitted by heartin on Sat, 04/30/2016 - 22:32
This is a quick summary of important keywords and reserved words that you should not be using as an identifier. Identifier is a name given to any class, method, interface, enum or variable that we create. There is also added quick notes section with few important keywords that may be useful for exam or interview preparations.
Keywords in Java
class, interface, enum(added in 5.0), package, import, new, this, super, return, void.
Submitted by heartin on Sat, 04/30/2016 - 21:55
Based on the scope in which the variable is declared, we can classify variables as Class variables, Instance Variables and Local variables.
Class variables (or static variables)
Class variables (or static variables) are declared within a class and outside all methods using the static keyword.
Example: Static variable
static int myVar;
Submitted by heartin on Sat, 04/16/2016 - 13:35
A composite key is a primary key composed of multiple columns.
When you are creating a composite key, your persistent class must override the equals() and hashCode() method. This is required for for Hibernate caching to work correctly. It must also implement the Serializable interface.
Best way to do this is to create a class with all your composite key fields, mark it as @Embeddable and then annotate a field of that class type with @Id in your entity class.
Submitted by heartin on Fri, 04/15/2016 - 15:27
An entity is a type on its own and has an existence of its own (e.g. Course, User etc.).
A value type is a type which doesn't have existence of its own, but belongs to an entity (e.g. Address of an User). Value types are always completely owned by their containing entity.
Defining entities and value types in Hibernate
Submitted by heartin on Wed, 04/13/2016 - 21:16
You have different logging options in Hibernate and let us see some of those options quickly. Hibernate supports simple property based log enabling to supporting standard logging frameworks and even programmatically accessing log statistics.