23 Sep

Creating and Building Jobs in Jenkins

Here I will show you how to create and build jobs in Jenkins. As a prerequisite please read Configuring JDK, GIT and Maven

Prerequisites

Already have Jenkins setup in Windows

Already have Jenkins configured with JDK, GIT and Maven

Already have sample java project in your Git repository (either in local or remote repository)

Read More

18 Sep

Manage Jenkins – Configuring JDK, GIT and Maven

Here I will show you how to configure Jenkins with JDK, GIT and Maven installations. If you need to know setup of Jenkins then please read http://www.jeejava.com/jenkins-setup-in-windows/

Read More

08 Sep

Jenkins Setup in Windows

Jenkins is the leading open source automation server, Jenkins provides hundreds of plugins to support building, deploying and automating any project.

  • Jenkins is a self-contained Java-based program, ready to run out-of-the-box, with packages for Windows, Mac OS X and other Unix-like operating systems.
  • Jenkins can be easily set up and configured via its web interface, which includes on-the-fly error checks and built-in help.
  • As an extensible automation server, Jenkins can be used as a simple CI server or turned into the continuous delivery hub for any project.
  • With hundreds of plugins in the Update Center, Jenkins integrates with practically every tool in the continuous integration and continuous delivery toolchain.
  • Jenkins can be extended via its plugin architecture, providing nearly infinite possibilities for what Jenkins can do.
  • Jenkins can easily distribute work across multiple machines, helping drive builds, tests and deployments across multiple platforms faster.

Read More

30 Aug

Spring Data JPA Entity Graphs

One of the important features in JPA 2.1 is the ability to specify fetch plans using Entity Graphs. This is useful since it allows you to customize the data that is retrieved with a query or find operation. It is expected to display data from the same entity in different and several ways when working with mid to large size applications. In other cases, you just need to select a smallest set of information to optimize the performance of your application.

Typically you do not have many mechanisms to control what is loaded or what is not loaded in a JPA Entity. You could use EAGER/LAZY fetching, but these definitions are pretty much static. You are unable to change their behaviour at runtime when retrieving data, meaning that you are stuck with what was defined in the entity. Changing these amid development is a nightmare, since it can cause queries to behave unexpectedly. Another way to control loading is to write specific JPQL queries. Read More

13 Aug

TDD – Test Driven Development

Test-driven development is related to the test-first programming concepts of extreme programming(https://en.wikipedia.org/wiki/Extreme_programming).

Life cycle of test-driven development

1. Write a test
2. Run the written test
3. Write code that corrects the failing test
4. Clean up your code
5. Go to step 1. Read More

02 Aug

Junit Testing Spring REST Services

In this tutorial we will see how to write Junit test cases on Spring REST services. Before continue to reading this tutorial please read first Spring RESTful Webservice CRUD Example

We have total four operations on this REST example. If you want you may add more operation such as find all products and apply Junit on it.

Read More

29 Jul

Spring RESTful Webservice CRUD Example

In this tutorial we show you how to build a RESTFul Web Service using Spring 4. We create a controller that will manage CRUD operations such as Create, Read, Update and Delete using the correct HTTP request methods POST, GET, PUT and DELETE respectively. Read More

16 Jul

Analyze Code Quality of Java Application using SonarQube

This tutorial will show you how to analyze code quality of Java applications using SonarQube. Maintaining the quality of code is an important part of the application and it is required to find out any bugs, issues in the developed code so that we can remove any kind of vulnerabilities from the application before moving to the production.

Read More

11 Jul

Spring Boot Multi-module Project

In this example we will see how to work with multi-module spring boot application and deploy them together in embedded Tomcat server. The individual module is also deployable. In this example we have three modules email-service – responsible for sending email to the specific email address, user-service – responsible for handling user related activities and we-service – responsible for handling client request/response.

Please read the tutorial on how to create multi-module maven project

Read More

27 Jun

Creating Custom HashMap in Java

Here we will see how to create a custom HashMap uaing Java language. We have seen the built-in implementation of HashMap in Java API and we know how HashMap works and its usages.

The intention of this example is not to create a rigid HashMap that provides the same functionalities as Java API provides but to give an idea how you can create your own HashMap.

We know also how HashMap works internally and here also we will look into the internal works of HashMap with same basic functionalities.

Read More

Share