REST Assured API Testing

REST Assured API Testing is a Java library for testing REST APIs. It provides a simple and efficient way to write automated tests for RESTful web services. REST Assured API Testing is designed to make it easy to write tests for REST APIs, whether they are simple or complex. It supports a wide range of … Read more

Jenkins CI/CD for Github using Deploy Keys

When setting up a continuous integration and deployment (CI/CD) pipeline using Jenkins and GitHub deploy keys, you can use the Jenkins GitHub plugin to interact with the GitHub repository. Here are the general steps for setting up a basic Jenkins CI/CD pipeline using GitHub deploy keys: Set up a Jenkins server: This can be done … Read more

Amazon Keyspaces – its usage, limitations and differences with Apache Cassandra

Amazon Keyspaces is a fully managed database service offered by Amazon Web Services (AWS). It is based on Apache Cassandra, and it is designed to be scalable, highly available, and easy to use.Amazon Keyspaces allows you to store, retrieve, and manage large amounts of data in a distributed database. It is well-suited for applications that … Read more

Connect to Apache Cassandra using Java

To connect to Cassandra in Java, you will need to include the Cassandra driver in your project. Here is an example of how you can do this: Download the Cassandra Java driver from the Apache Cassandra website or from Maven Central. Add the driver to your project. If you are using Maven, you can include … Read more

Parameter 0 of constructor in org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration required a bean of type ‘javax.sql.DataSource’ that could not be found. – Bean method ‘dataSource’ not loaded because @ConditionalOnProperty (spring.datasource.jndi-name) did not find property ‘jndi-name’ – Bean method ‘dataSource’ not loaded because @ConditionalOnBean (types: org.springframework.boot.jta.XADataSourceWrapper; SearchStrategy: all) did not find any beans

This error message is indicating that your application is unable to find a bean of type ‘javax.sql.DataSource’ that is required by HibernateJpaAutoConfiguration. The error message suggests that there is a missing @ConditionalOnProperty annotation on the dataSource() method, which is causing the bean not to be loaded. The @ConditionalOnProperty annotation checks for the presence of a … Read more

Jenkins CI/CD using Github Account

When setting up a continuous integration and deployment (CI/CD) pipeline using Jenkins and a GitHub account, you can use the Jenkins GitHub plugin to interact with the GitHub repository. Here are the general steps for setting up a basic Jenkins CI/CD pipeline using a GitHub account: Set up a Jenkins server: This can be done … Read more

Write a Java program to generate age gender statistics

Here is a very simple Java program that generates age and gender statistics for a group of persons:

This program defines a map called persons, which stores the age and gender of each person as a key-value pair. The program then iterates through the map, updating counters for the number of males and females, … Read more

Hello World in Java

Here is how you can write “Hello, World!” in Java: public class HelloWorldJava { public static void main(String[] args) { System.out.println(“Hello, World!”); } } To run this program, you will need to save it in a file called “HelloWorldJava.java”, and then use a Java compiler to compile it. Once the program has been compiled, you … Read more

Jenkins CI/CD with Github with Webhooks

Creating a CI/CD pipeline using Jenkins and GitHub can be a bit involved, but I can give you an overview of the process. First, you’ll need to set up a Jenkins server. This can be done by installing Jenkins on a server or by using a cloud-based version, such as Jenkins on Azure or AWS. … Read more