Java developer blog

Kotlin type hints in IDEA

Kotlin type inference is a cool thing. It literally allows you to type less. However, in some cases it can be confusing which type is returned by a method that is called. To overcome this issue w...

How to set up Kotlin code style in IDEA

In the Java world no one argues about naming conventions and code style, right? The same thing happens in the Kotlin world. Kotlin uses the same naming convention but it is own code style. It is ...

How to use swagger to document REST API: Code first approach

Code first approach The approach is to implement all endpoints and models in a code and then expose REST API to a client or a developer in a company. In the previous post I described API first ap...

How to use swagger to document REST API: API first approach

Swagger is a tool that helps you create and document your REST API. By REST API I mean endpoints and models. By endpoint I mean get, post, put, delete handlers. By model I mead data that pass to...

How to disable scheduling for a spring boot test

Add a separate configuration class with @Profile(!test), @EnableScheduling annotations 1 2 3 4 @Profile(!test) @Configuration @EnableScheduling public static class SpringConfiguration {} Then ei...

How to deploy a spring boot application into a Java EE Application Server

If you want to deploy a spring boot application into a Java EE Application Server (Glassfish, Jboss Wildfly and etc) you have to make some changes to the source code and the build script. I will sh...

Liquibase Tips

If you haven’t heard about liquibase yet then I will explain it shortly: it is a tool that helps you manage all database changes very easily. Use maven/gradle plugin to update dev databas...

Liquibase SQL format. Statement and rollback example

Statement and rollback example 1 2 3 4 5 6 7 8 --liquibase formatted sql --changeset author:id CREATE TABLE order ( ... ); --rollback drop table order; Statement and rollback multiple line exa...

How to add liquibase to the existing project

Overview Sometimes you need to track changes in a database. Hopefully, there is exist an open-source and free solution to the problem. The solution is called liquibase. How to add liquibase Fi...

Xamarin Forms no resource found that matches the given name error

I have Visual Studio 2015 Update 3, Xamarin 4.2.0.719, Xamarin Forms. Sometimes you could get an error like these below. 1 2 3 Error No resource found that matches the given name (at 'src' with...