Blog Archives
1 … 22 23 24 25 26 27 28 29 30

Logging in Java with Logback and MDC Tutorial

Logback brings a very large number of improvements over log4j like faster execution, native support for SLF4J,XML or Groovy based configuration files, automatic reloading of config files to name a few. logback builds upon on our previous work on log4j, simply put, logback is just a better log4j.

…

Read more ›



MapReduce to HBase: Read from & write to

This tutorial extends 1. HBase Tutorial Getting Started & 1. Hadoop MapReduce Basic Tutorial to read an HBase table with data from the mapper and write the max marks for each subject to another HBase table from the reducer..

Input Data Marks secured by 4 students

Step 1: Let’s store this Data in HBase database as described in tutorial 1.

…

Read more ›



Maven and Cobertura Tutorial

Cobertura is a free code coverage tool, which calculates the percentage of Java code accessed by unit tests.

Step 1: The pom.xml file with the relevant reporting plugins. The properties also shown to set the coverage percentage and to skip code coverage or not.

…

Read more ›



Maven assembly & Shade plugins examples & uber jar creation

Maven assembly plugin is primarily intended to allow users to aggregate the project output along with its dependencies, modules, site documentation, and other files into a single distribution archive like zip, tar, tar.gz, war, etc. Another example where this is handy is to create deployable files for different environments like myapp-1.10-SNAPSHOT-dev.zip,

…

Read more ›



Maven assembly plugin examples

This extends the Maven assembly plugin with additional examples to create an assembly by controlling what artifacts get included in the archive.

Example 1: dev-assembly.xml

The datasource and properties files are packaged for DEV environment.

Example 2: dev-assembly.xml

Control what maven dependency jars and class files are included in the archive.

…

Read more ›



Notepad++ beginner tutorial

You can download Notepad++ from http://notepad-plus-plus.org/download. It is a very handy productivity boosting tools.

Q. Why is Notepad++ is a very handy tool?
A.  Notepad++ is a very handy developer tool. Here are some of the productivity benefits of Notepad++.

…

Read more ›



Notepad++ productivity tips with SQL trigger code example

One of the traits of good developers is that being lazy and this laziness leads to finding productive ways to perform a task. Recently, I had to create a number of triggers to a few existing tables. It is quite a repetitive task, hence I decided to use notepad++ regex feature with find/replace to make a bit more interesting and productive.

…

Read more ›



Notepad++ to construct SQL where clause

Let’s take a tutorial like scenario to demonstrate power of Notepad++ as a developer productivity tool.

This approach can be used in other text editors like sublime, atom, etc that support regular expression (i.e regex) based find & replace.

Q. How will you extract rule_name values from a tabular data shown below and convert it to a comma separated values that can be used in an SQL WHERE clause.

…

Read more ›



Orika Bean Mapping Tutorial

This tutorial compliments Basic Dozer Tutorial. Orika is another bean mapping framework.

Step 1: Create a simple Maven project from a command-line. Just press enter for all the prompts.

Step 2: Import the above “simple-orika” folder in the file system into eclipse.

…

Read more ›



Orika Bean Mapping with Spring

This tutorial extends Orika Bean Mapping Tutorial by using Spring to configure Orika.

Step 1: Create a simple Maven project from a command-line. Just press enter for all the prompts.

Step 2: Import the above “simple-orika” folder in the file system into eclipse.

…

Read more ›



Part #1: JPA Hibernate Spring Maven Eclipse Tutorial – setting up pom.xml

Any non trivial application needs to talk to databases. JPA is for ORM (Object to Relational Mapping) frameworks like Hibernate as JDBC is database connectivity.

The finished project artifacts are shown below, and it consists of Java classes, properties files, and Spring “JavaConfig” files with @Configuration annotation.

Let’s start with bringing in the dependent jar files via maven pom.xml in this part.

…

Read more ›



Part #2: JPA Hibernate Spring Maven Eclipse Tutorial – JPA configs and repository

This extends Part #1: JPA Hibernate Spring Maven Eclipse Tutorial. Spring wires dependencies with “MyDomainConfiguration” JavaConfig file. You have a Service Layer –> DAO (or Repository) Layer –> Entity (i.e. maps relational data to an object). … Read more ›...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


Part #3: JPA Hibernate Spring Maven Eclipse Tutorial – testing data access with HSQLDB

This tutorial focuses on testing data access logic with spring-test and hsqldb. This extends Part #2: JPA Hibernate Spring Maven Eclipse Tutorial – JPA configs and repository Testing the mapping of entities managed by hibernate and wiring up of JPA, Hibernate, etc via Spring. Schema and mock data similar to...

This content is for 30-Day-Full-Access, 100-Day-Full-Access, 200-Day-Full-Access, and 365-Day-Full-Access members only. Register 80+ Free Java FAQs 80+ Free Big Data FAQs
Already a member? Log in here


1 … 22 23 24 25 26 27 28 29 30

300+ Java Interview Questions - FAQs

Tutorials on Java & Big Data