Quartz Scheduler Tutorial

quartz-thumbnail

Schedulers are important for running the batch process in your application. There are plenty of Java scheduler frameworks available in the market. Among them, Quartz Scheduler is the most popular and most widely used by Java projects. This tutorial provides very simple example to write Quartz scheduler. When you complete reading this tutorial, you will […]

How to Check Hidden File in Java?

java

If you want to check if a file is hidden or not. Then use the below code snippet. The method isHidden() in the File class is used for checking if the file is hidden or not. This is simple utility which is useful when you are working with the File operations.

Convert String to Date using SimpleDateFormat

java

Many developers find it hard for understanding the conversion of plain string to the Date object with the desired format. This is a very basic requirement in any Java application. This tutorial provides few basic formats examples using the SimpleDateFormat class. Also there is plenty of formats available and supported by JDK, you can try […]

Create Spring Beans using Factory Methods

spring

The advantage of using the spring framework is the efficient beans management by the IOC container. We never create an instance in the code instead spring creates and manages them. In the certain scenarios, the demand is to use the factory methods for creating the instances of an particular object due to the restriction imposed […]

Use Trang to Generate XSD from XML File

xml

XML schema used for defining the restriction on XML data structure. It is adding the highly validated data structure and useful for defining the types for the data in XML files. In a normal practice, first a developer creates a XSD (schema) with validations or enforcement for the XML structure, later all the XML files […]

Spring Framework 4.0 RC1 Released

spring

Spring Framework 4.0 Release Candidate 1 is released by Spring IO this week. Earlier they have announced that Spring 4.0 is due to the release in October 2014. However, in the latest blog post they have indicated that it will be available by December 2014. The last addition of new features with this release candidate […]

How to create a Spring Bean of an Inner class?

spring

In this tutorial I will explain how to declare bean definition for the Inner classes in Spring XML configuration. When you are using inner class as spring beans, you have to specify the binary class name of that inner or nested class to instantiate as a bean. If you have a class ExampleType and it […]

Register Spring Beans to BeanFactory using registerSingleton

spring

Spring’s strength lies on its core framework’s Inversion Of Control (IOC) and how the beans are instantiated and managed by the IOC container. All the beans in the spring’s IOC containers are managed as the singleton beans by default for the efficient and good performance. As a good practice, you should never create instance for […]

How to use Spring EL in XML configurations?

spring

In our previous tutorial we have explained in detail about how to use the spring expression language. This tutorial is a simple example to demonstrate how to use the expression language in XML configuration file. Employee.java Company.java SpringExpressionDemo.java beans.xml If you run the above example program, you will get the output as: I hope this […]

Use @Import for Importing JavaConfig Files in Spring Projects

spring

In my previous article I have explained about the JavaConfig in Spring 3.0. It is a new way of configuring the bean definitions without using the traditional XML files. Also I have listed the annotations defined as part of JavaConfig approach. In the list, @Import is the one such annotation used for consolidating all the […]