As per the 12-factor app, the methodology to develop the modern, scalable, maintainable software-as-a-service apps, the recommendation is that we should manage the database versioning.
In this article, we will demonstrate to you how we can use liquibase with spring boot to manage the database schema versioning.
Liquibase Community is an open source project that helps millions of developers rapidly track, version, and deploy database schema changes.
Manging database versioning is a really crucial part and the team has to manage those. In the Java community, there are two tools available flyway and liquibase. Database schema migration performed on a database whenever it is required like want to revert the change rollback to some nth version. Liquibase supports most of the major databases and different types of format for schema change files like XML, SQL, YAML, JSON. It is database vendor-independent means it does not depend on any DB specific syntax. …
Why we should keep comments in our code and configuration simple and minimal.
As a developer, I have been practicing to write down the comments in code wherever it is applicable but this article I am writing here because one of my senior teammates appreciated me because of the comments which I have written in configuration files. That single line of comment helps me to take good sleep and help my teammate to have things ready within minutes.
We are working in teams and if the team is distributed across different timezone then it's a bit hard to have daily communication and as a development paradigm shifts and we started developing more distributed, serverless microservices. For one single person to memorize each and everything about the application it's a critical one, even though we can create beautiful documentation that will not help when we need to trace out in the code. …
In this article, we will see how to use the “ docker commit “ command to create an image from the container.
Most of us are familiar with docker and container platforms and all most everyone used “ docker run ” command to create a container from the image but do you know how to create a docker image from running docker container.
While creating the containers in a certain situation we did some config changes or file changes in the container and after validation, we want to make sure those should be available in an image but the reverse way not feasible, if we remove the container then these changes will get vanish, so instead of we do manually changes in docker file and then create a container from it we can use docker commit command. …
If you are a java developer then you are very much familiar with these two build tools and most of you are using either of the tools in day-to-day work.
In this article, you will come to know how you can eassily and seamlessly convert pom.xml into build.gradle and vice-versa.
Many times organization prefers to using either of the build tools and for the same project, few of the developer want to use other tool and want to play and makes his\her hands dirty for them this article is useful.
Gradle is a build automation tool for multi-language software development. It controls the development process in the tasks of compilation and packaging to testing, deployment, and publishing. Supported languages include Java, C/C++, JavaScript. …
In this article, we will demonstrate to you how to develop a Mustache template technology with a spring-boot.
Below is the high-level technology we are using.
Let us jump into the https://start.spring.io/ and generate the project with the below starters.
spring-boot-starter-web
and spring-boot-starter-mustache
build.gradle
plugins {id 'org.springframework.boot' version '2.4.1'id 'io.spring.dependency-management' version '1.0.10.RELEASE'id 'java'}group = 'com.techwasti.mustache'version = '0.0.1-SNAPSHOT'sourceCompatibility = '11'repositories {mavenCentral()}dependencies {implementation 'org.springframework.boot:spring-boot-starter-mustache'implementation 'org.springframework.boot:spring-boot-starter-web'testImplementation 'org.springframework.boot:spring-boot-starter-test'}test {useJUnitPlatform()}
Mustache is a simple web template system. It is available for many programming languages including Java. Mustache is described as logic-less because it does not have any explicit control flow statements, such as if and else conditionals or for loops. Looping and conditional evaluation can be achieved using section tags processing lists and lambdas. …
Most people will laugh by reading the title of this blog post and many people think what is this, already we know this is very simple by enabling flag but here is tricky. There are three ways we can log SQL statements,
This is the standard property 99% of people know and all of us are used this property to enable and disable the SQL statement in logs. To enable/disable we are including this property in the application.properties file.
spring.jpa.show-sql=true
The disadvantage of this logger is that it will just show us this log
Hibernate: insert into patient (id, name, address) values (?, ?, …
In this article, we will demonstrate to you how to develop thymeleaf view with a spring-boot.
Below is the high-level technology we are using.
Let us jump into the https://start.spring.io/ and generate the project with the below starters.
spring-boot-starter-web
and spring-boot-starter-thymeleaf
build.gradle
plugins {id 'org.springframework.boot' version '2.4.1'id 'io.spring.dependency-management' version '1.0.10.RELEASE'id 'java'}group = 'com.techwasti'version = '0.0.1-SNAPSHOT'sourceCompatibility = '11'repositories {mavenCentral()}dependencies {implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'implementation 'org.springframework.boot:spring-boot-starter-web'testImplementation 'org.springframework.boot:spring-boot-starter-test'}test {useJUnitPlatform()}
Thymeleaf is a Java XML/XHTML/HTML5 template engine that can work both in web and non-web environments. Thymeleaf is a java template engine that can work on both web and standalone mode. …
Now a days we have daily come across two things fintech and machine learning. These two are industry buzzwords along with other words but if you have opened this article that means you are already familiar with these terms.
In this article, we are gone explore federated or collaborative machine learning in fintech.
Source: https://ai.googleblog.com/2017/04/federated-learning-collaborative.html
To analyze which beans contribute the most of the application startup time using actuator endpoint for spring boot applications.
Spring Boot actuator includes a number of additional features to help you monitor and manage your application. There are a number of endpoints the most popular one and people frequently used is the health endpoint.
I know if your encounter with this article means you already aware of the spring boot actuator endpoints such as health, info, cache, env, etc.
An actuator is a manufacturing term that refers to a mechanical device for moving or controlling something. Actuators can generate a large amount of motion from a small change. …
In this article, we will check how spring boot exit code works and How to create your own exit codes.
When you started spring boot application in your logs some times you have seen logs like " Process finished exit code 0 "
Maybe you have noticed or sometimes not noticed, but the above message is in the success scenario or Happy scenario whereas in the failure scenario you got to know something like "…exit code -1". …
About