Posts

Showing posts from March, 2019

Spring boot with Thymeleaf example

Image
This blog shows how to use Thymeleaf as a template engine with Spring boot. Technologies Used Java 8 Spring framework  1.5.9 Spring boot 1.5.9 Thymeleaf 2.1.6 Tomcat embed 8.5.23 Logback 1.1.1.1 Junit 4.12 Bootstrap 4 Maven 3.5.0 Implementation This project uses Maven to build the project.  It shows a very simple example of a login page with corresponding Spring boot controller. The goal of this project is to have a login page rendered using Thymeleaf template. The template it self uses the bootstrap css for styling. High level steps as described bellow with sample code Define the pom.xml file Write Spring boot app class Write Spring boot controller class Write  Thymeleaf Template for the controller class Write the CSS referred by Template file pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&qu

Installing Couchdb on GCP Compute Engine

Image
This article covers the steps that needed to install Apache Couchdb on Google Cloud Platform. There are various way of how to achieve this, that is having a Compute Engine (VM) installed with Couchdb. One option is to use the the Marketplace in GCP which offers quick option to deploy on Cloud Platform. Login to GCP and click on the  Marketplace Icon and then search for CouchDB. Although we would still need to perform some additional steps like Creating Firewall Rule etc so that we can access the instance after getting VM with CouchDB installed from Marketplace. Rather than using the Marketplace, we would do everything manually on the VM Instance. Following are the steps in details that i had to take to lunch an instance of CouchDB, do configuration update and create Firewall Rules to allow access to the instance. High level steps as covered bellow are Create an Instance of Google Cloud Engine Instance Install Apache CouchDB in the VM Configure the Database Instance