Posted in Server

How To Create Users In Tomcat Server

Introduction Here I am going to show you how to create users in Tomcat server to manage applications, server status, etc. When you deploy application into Tomcat server, generally you put the war archive files under webapps folder of the Tomcat server. You can easily access the application once it is successfully deployed through its context path of the application….

Continue Reading... How To Create Users In Tomcat Server
Posted in File Java

Write Or Append To A File Using Java

Introduction In this short example code I will show you how to create a new file for writing into it or if the file already exists then append to it instead of creating a new file using Java programming language. If you have a requirement that either you need to log some data into an existing file or create a…

Continue Reading... Write Or Append To A File Using Java
Posted in Spring Boot Spring JPA Spring Security

PreAuthorize HasRole Security Using Spring Boot Data JPA

Table of Contents Introduction Where is @PreAuthorize applicable? Prerequisites Project Setup MySQL Table Data Application Config Entity Classes Repository Interfaces Service Class REST Controller Class Security Config Spring Boot Main Class Testing Spring Security – PreAuthorize hasRole Source Code Introduction PreAuthorize hasRole Spring security will determine whether a user can invoke a method or not based on his/her role. hasRole()…

Continue Reading... PreAuthorize HasRole Security Using Spring Boot Data JPA
Posted in Python

Pretty Print JSON In Python

Table of Contents Introduction Why do you need to prettify the JSON data? Prerequisites Pretty Print JSON Source Code Introduction In this example I am going to show you how to pretty print JSON in Python programming language. The ugly JSON or one liner JSON data or string could be very difficult to read manually and that’s why you may…

Continue Reading... Pretty Print JSON In Python
Posted in Gradle

Generate Single Jar Or War In Spring Boot App Using Gradle Build Tool

Table of Contents Introduction Wny do you need a single jar or war Prerequisites Generating Jar Generating Thin Jar Generating Fat Jar Generating War Generating Thin War Generating Fat War Source Code Introduction Generally most of the Spring Boot applications generate jar archive for deployment. Very few Spring Boot applications generate war archive for deployment in the production environments. There…

Continue Reading... Generate Single Jar Or War In Spring Boot App Using Gradle Build Tool
Posted in jQuery Spring Boot

Spring Boot Thymeleaf jQuery MultiSteps Form

Table of Contents Introduction Prerequisites Project Setup MySQL Table DataSource Config Entity Class Repository Interface Service Class Spring Web Controller Spring Boot Main Class UI (User Interface) Testing Multi Steps Form Source Code Introduction In this example I am going to show you how to build multisteps form using Spring Boot thymeleaf jquery. Multi steps form is required when users…

Continue Reading... Spring Boot Thymeleaf jQuery MultiSteps Form
Posted in Gradle Junit

Junit 5 Test Report Using SonarQube Jacoco Gradle

Table of Contents Introduction Prerequisites Project Setup The Junit 5 Test Class Generating Test Reports Scanning Project with Sonar Source Code Introduction In this Spring Boot based application I am going to show you how to generate Junit 5 test report using SonarQube Jacoco gradle build tool. You need to generate such test reports to ensure that your source code…

Continue Reading... Junit 5 Test Report Using SonarQube Jacoco Gradle
Posted in Angular

How To Create Photo Gallery In Angular

Table of Contents Introduction Prerequisites Project Setup Setup ngx-lightbox App Module Configuration Update Title App Component App HTML App Styles Testing Angular Photo Gallery Source Code Introduction In this example I am going to show you how to create photo gallery in Angular application. Photo gallery also known as image gallery or media gallery or photo album and it is…

Continue Reading... How To Create Photo Gallery In Angular
Posted in Codeigniter

CodeIgniter 4 REST API JWT Authentication

Table of Contents Introduction Prerequisites Project Directory MySQL Table Database Configuration Route Configuration Model Controller Library Testing CodeIgniter 4 REST JWT Source Code Introduction In this example I will show you how to use JWT (JSON Web Token) in CodeIgniter 4 REST API for authenticating/authorizing a user when he/she is trying to access REST API. A user must register in…

Continue Reading... CodeIgniter 4 REST API JWT Authentication
Posted in Excel Java

Detect Hidden Rows In Excel File Using Apache POI

Table of Contents Introduction Prerequisites Project Setup Detect Hidden Rows/Cells in Excel Java Code Testing Hidden Rows/Cells Source Code Introduction Here in this example I am going to show you how to detect hidden rows in excel file using Apache POI library with the help of Java program. The following data are used in the excel sheet. The first two…

Continue Reading... Detect Hidden Rows In Excel File Using Apache POI