Logging is important in software development. There are many famous frameworks to be used for logging: Log4j, Logback, java.util.logging… If we wanna change the logging framework without affecting Java code, SLF4J is the good choice.
This tutorial writes about SLF4J with example of how to apply SLF4J in some logging frameworks.
[Continue reading…] “Logging with SLF4J”
Maven build lifeCycle is the central concept of Maven. The sequence of phases which define the order of building and distributing artifact/project is defined with a build lifeCycle.
There are three standard lifeCycles: default, clean and site.
– default handles project deployment.
– clean handles project cleaning.
– site handles the creation of project’s site documentation.
This tutorial will introduce these Maven build lifeCycles, relation between concepts of phases and plugin goals.
[Continue reading…] “Maven Introduction – Part 4: Maven Build LifeCycle”
Dependency Management is a key feature of Maven. Maven Dependencies are identified by individual artifacts such as libraries or modules. It is not too difficult to manage dependencies for just a single project but, with multi-module projects, there are many things unclear.
This tutorial introduces the Maven Dependency Mechanism by which Maven helps us control them.
[Continue reading…] “Maven Introduction – Part 3: Maven Dependency Mechanism”
Following previous Maven article, we will go through more Maven concepts such as Maven Repositories, Plug-ins to understand better Maven standards.
[Continue reading…] “Maven Introduction – Part 2: Maven Repositories and Plugins”
Maven is a software project management and comprehension tool, an open source project by the Apache community. It can also model a standard structure for Java projects. With Project Object Model (POM) approach, Maven provides a uniform and radical way of understanding and building Java project, reporting and documentation with all its dependencies.
This tutorial will go through quite a few Maven concepts with Eclipse IDE so that we can have a better understanding about its standards.
[Continue reading…] “Maven Introduction – Part 1”
In the tutorial, we will show you how to customize Authentication Success Handler with Spring Security web application.
[Continue reading…] “Spring Security – Customize Authentication Success Handler”
In the tutorial, we will show you how to customize Logout Success Handler with Kotlin Spring Security web application.
[Continue reading…] “Spring Security – Customize Logout Success Handler”
Spring Expression Language (SpEL) is a powerful expression language that supports querying and manipulating an object graph at runtime.
This tutorial shows various examples of ways to use SpEL expressions with XML and annotation based configuration. We also know how to evaluate an expression using SpEL classes and interfaces.
[Continue reading…] “Spring Expression Language SpEL”
@Resource Annotation is used to indicate a reference to a resource, it is considered an alternative to @Autowired which is an Spring standard. Similar to Java EE 5, we can use @Resource Annotation with field injection or setter method.
This tutorial will cover those kinds of injection which will be used for matching by Name, Type or Qualifier.
[Continue reading…] “@Resource Annotation in Spring”
Java 8 comes with some prominent features like Lambda Expressions, Method References. And Streams are also an important concept that we should comprehend.
This tutorial will help you have a deep view of Java 8 Streams: what they are, ways to create them, how they work with intermediate operations, terminal operation…
[Continue reading…] “Java 8 Streams”
Callable is a Java interface that is an useful methodology for control multi-threading returns on concurrency development.
The tutorial will guide you to build a concurrency program with ThreadPoolTaskExecutor of Spring Framework and Callable interface.
[Continue reading…] “Spring ThreadPoolTaskExecutor with Callable interface for concurrency programming”
Method References make it clear when referring to the existing method by name.
In the article Lambda Expressions and Functional Interfaces, we use lambda expressions to create anonymous methods and sometimes, calling an existing method is the only thing it does.
When using lambda expression without input arguments or those input arguments doesn’t make sense, we can use Method References to simplify the syntax.
This tutorial introduces four kinds of Method References and how to use them efficiently with some Functional Interfaces.
[Continue reading…] “Java 8 – Method References”
Functional Interfaces is one of the new important things of Java 8. In previous article, we had a little view about common use cases of Lambda Expression including Runnable and ActionListener. They are example of Functional Interfaces.
This tutorial helps you have deeper concept of Functional Interface, then some interfaces which are provided in java.util.function package such as Predicate and Function.
[Continue reading…] “Java 8 – Functional Interfaces”
Lambda expressions are new feature in Java 8. We now can represent one method interface by using an expression.
[Continue reading…] “Java 8 – Lambda Expressions”
Configure Spring Security for Spring MVC web application + SpringBoot
In the tutorial, JavaSampleApproach will show you how to configure Security for SpringMVC web application.
[Continue reading…] “Spring Security – Config Security for Web MVC by Spring Boot”
Abstract factory pattern is a Super-Factory of a group familiar factories. We can use it to expose API for integration code and hidden the logic implementation. Abstract Factory gives us a way to manage and decouple design in case Program has more than one Factory having the same Interface.
The tutorial will guide you a sample for how to program with Abstract Factory Pattern.
[Continue reading…] “Java Design Pattern – Abstract Factory Pattern”
Factory Pattern is a kind of Creation Pattern. Factory Pattern provides an interface for integration and hidden the complex implementation of related components.
The tutorial will help you create a factory pattern based on concept above.
[Continue reading…] “Java Design Pattern – Factory Pattern”
Singleton Pattern is a design pattern which you often meet in almost applications. Singleton Pattern provides a way to instantiate only one instance in an application context.
The tutorial introduces the design of Singleton Design Pattern and give many ways to create a Singleton Pattern in your application.
[Continue reading…] “Java Design Pattern – Singleton Pattern”
Docker is a new revolution for Linux container and it is a powerful tool for MicroService development.
The tutorial will guild you how to build a Spring Boot application and deploy it with Docker container.
[Continue reading…] “Spring Boot with Docker Container”