Spring Framework by default is using JAXB for binding XML schemas and Java objects. When we generate our Java representations from XML schema using JAXB, our POJOs will contain JAXB annotations like @XmlRootElement, @XmlElement, etc. If we want Spring to use Jackson with our POJOs generated by JAXB, we will have to add following dependency to our pom.xml file:
Building a microservice application is not an easy task in terms of tools you should know. We need different tools in each phase of the life cycle of a microservice application. Development, tests, build and even deployment of our microservice application to the production is not the end of the story. We need to monitor it and react to malfunctions. Let’s see what kind of tools are needed on each phase.
In this simple example I would like to show you how to build an application using a few technologies like Spring Boot with FreeMarker Java Template engine for rendering the view, Java Persistence API for storing our objects into the database and simple REST API for application’s data manipulation. We will add some Groovy integration tests using Spock testing and specification framework. Our application functionality will be very simple. We will be able to add users using both rendered HTML page and REST API and store them into in-memory Java SQL database called H2. The list of users will be displayed on the main page.
Since Java 8 we have a new way of finding files in a file tree using
find() method from
Files class. This class contains a set of static methods used for operating on files, directories, or other types of files. In this post we will implement functionality of finding files which were modified given number days ago.
Imagine yourself in a situation when you need to add a new functionality to an old and badly written code. What do you think first? “I need to refactor it all!”. Then second thought is coming: “better not to touch it too much” or “I will use a copy-paste pattern” or even “I need to change the job”. The first idea you have of course depends on your experience. In this article I would like to share my thoughts with developers who are struggling against themselves in such a situation.
In order to start building web applications we need to prepare a set of tools which will help us to do this efficiently. Starting a project using Angular requires the knowledge about at least a few technologies. I do not want to discourage you at this point. I will show you what is needed for starting your first “hello world” project. I will base on free tools available on the Internet. I assume you have at least basic knowledge about Angular platform. If not, you may start from Angular documentation website. Your first web application project will be a good starting point for learning more about web applications development.