Configure Logback in Spring-Boot Application for Logging

spring

In this article, we will learn how to configure logback in the spring boot application for logging and how to configure Logback with specifications including console and file output separately, and here we will also learn to use the rolling file policy to avoid generating large size log files and after a certain threshold size limit it will be back ... Read More »

Install Python on macOS

python

Python is the most popular programming language. Python is used for web development, Data Science, Machine Learning, Artificial intelligence, Operating Systems, Mobile application development, and video games. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. This article will guide you in installing Python on macOS through step by step instruction. How to Install Python on ... Read More »

Install Python on Linux

python

Python is the most popular programming language. Python is used for web development, Data Science, Machine Learning, Artificial intelligence, Operating Systems, Mobile application development, and video games. It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming. This article will guide you in installing Python through step by step instruction. How to Install Python on Linux (Ubuntu) ... Read More »

Install pip, virtualenv environment and activate the virtualenv in Linux

python

This article will guide you in installing pip, a virtual environment, and activating the virtual environment. The virtual environment is also known as virtualenv for Python2 and vend for Python3. What is pip? pip is a tool that allows you to install and manage additional libraries and dependencies that are not distributed as part of the standard library. Package management ... Read More »

GIT: Replace the master branch with working branch

There is no direct way to replace the master branch of your git project with the working branch (or any other branch), but with the ‘ours‘ strategy of the GIT, you can achieve this task. This strategy will replace the master branch entirely with the working branch. Lets do this step by step: Checkout the working branch (say working_branch) Merge ... Read More »

Configure Spring RestTemplate with OkHttp3 in Spring Boot Application

spring

Okhttp3 is a popular HTTP client implementation for Java and we can easily embed it in our Spring Boot RestTemplate abstraction. Below is the Bean definition which binds the instance of Okhttp3 client with RestTemplate. Now to integrate in our implementation class we just need to autowire the Resttemplate to use this customized Okhttp3 based resttemplate. How to use RestTemplate ... Read More »

Configure Spring RestTemplate with HttpClient in the Spring Boot Application

spring

In this post we will learn how to configure Spring RestTemplate with HttpClient in the Spring boot Applications. This example supports both HTTP and HTTPS. It Uses a connection-pool configurations to re-use connections and save overhead of creating connections. It has configurable request and socket timeouts, keep-alive strategy and also close idle connection strategy to monitor inactive connections and clean ... Read More »

Redirect your wordpress site from http to https using .htaccess rule

apache

Once you have added an SSL certificate to your domain, the next thing that needs to configure your site is to forcefully redirect from HTTP to HTTPS. If your site has been configured using WordPress, then you can do the required changes using the .htaccess file. .htaccess file is located at the main directory of the WordPress project, ie; in ... Read More »

Autowiring Components from external jars in Spring Boot Project

spring

In an Spring Boot project, sometimes we have to autowire components which are available in another jar or in another module which is added as a jar in the main module of the project. Considering the use case of my spring boot application, I created my Spring Boot project, using maven modules. One of the modules was called daolayer, one ... Read More »

Invalid JSON if integer value starts with 0

javascript

If any integer value in the JSON starts with 0, the parser will throw an error as “invalid key:value pair” or “SyntaxError: Unexpected number in JSON at position xx” . The reason of this error is because if the integer begins with leading 0 then it will consider this value as Octal number. As Octal number always starts with 0 ... Read More »