diff --git a/.gitignore b/.gitignore
index 42c540f..cb61f84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.DS_Store
+.settings/
# Compiled class file
*.class
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000..72308aa
--- /dev/null
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,114 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL =
+ "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: : " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..cd0d451
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
diff --git a/README.md b/README.md
index 4cf8cd7..7ac8986 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# YugaStore in Java
-This is an implementation of a sample ecommerce app. This microservices-based retail marketplace or eCommerce app is composed of **microservices written in Spring (Java)**, a **UI based on React** and **YugaByte DB as the distributed SQL database**.
+This is an implementation of a sample ecommerce app. This microservices-based retail marketplace or eCommerce app is composed of **microservices written in Spring (Java)**, a **UI based on React** and **YugaByte DB as the distributed SQL database**.
If you're using this demo app, please :star: this repository! We appreciate your support.
@@ -22,108 +22,135 @@ You can also [try the app out](https://yugastore-ui.cfapps.io/) online, it is ho
The architecture diagram of YugaStore is shown below.
-
+
-| Microservice | YugaByte DB API | Default host:port | Description |
-| -------------------- | ---------------- | ---------------- | --------------------- |
-| [service discovery](https://github.com/YugaByte/yugastore-java/tree/master/eureka-server-local) | - | [localhost:8761](http://localhost:8761) | Uses **Eureka** for localhost. All microservices register with the Eureka service. This registration information is used to discover dynamic properties of any microservice. Examples of discovery include finding the hostnames or ip addresses, the load balancer and the port on which the microservice is currently running.
-| [react-ui](https://github.com/YugaByte/yugastore-java/tree/master/react-ui) | - | [localhost:8080](http://localhost:8080) | A react-based UI for the eCommerce online marketplace app.
-| [api-gateway](https://github.com/YugaByte/yugastore-java/tree/master/api-gateway-microservice) | - | [localhost:8081](http://localhost:8081) | This microservice handles all the external API requests. The UI only communicates with this microservice.
-| [products](https://github.com/YugaByte/yugastore-java/tree/master/products-microservice) | YCQL | [localhost:8082](http://localhost:8082) | This microservice contains the entire product catalog. It can list products by categories, return the most popular products as measured by sales rank, etc.
-| [cart](https://github.com/YugaByte/yugastore-java/tree/master/cart-microservice) | YCQL | [localhost:8083](http://localhost:8083) | This microservice deals with users adding items to the shopping cart. It has to be necessarily highly available, low latency and often multi-region.
-| [checkout](https://github.com/YugaByte/yugastore-java/tree/master/checkout-microservice) | YSQL | [localhost:8086](http://localhost:8086) | This deals with the checkout process and the placed order. It also manages the inventory of all the products because it needs to ensure the product the user is about to order is still in stock.
-| [login](https://github.com/YugaByte/yugastore-java/tree/master/login-microservice) | YSQL | [localhost:8085](http://localhost:8085) | Handles login and authentication of the users. *Note that this is still a work in progress.*
+| Microservice | YugaByte DB API | Description |
+| -------------------- | --------------- | --------------------- |
+| [react-ui](https://github.com/YugaByte/yugastore-java/tree/master/react-ui) | - | A react-based UI for the eCommerce online marketplace app.
+| [api-gateway](https://github.com/YugaByte/yugastore-java/tree/master/api-gateway-microservice) | - | This microservice handles all the external API requests. The UI only communicates with this microservice.
+| [products](https://github.com/YugaByte/yugastore-java/tree/master/products-microservice) | YCQL | This microservice contains the entire product catalog. It can list products by categories, return the most popular products as measured by sales rank, etc.
+| [cart](https://github.com/YugaByte/yugastore-java/tree/master/cart-microservice) | YCQL | This microservice deals with users adding items to the shopping cart. It has to be necessarily highly available, low latency and often multi-region.
+| [checkout](https://github.com/YugaByte/yugastore-java/tree/master/checkout-microservice) | YSQL | This deals with the checkout process and the placed order. It also manages the inventory of all the products because it needs to ensure the product the user is about to order is still in stock.
+| [login](https://github.com/YugaByte/yugastore-java/tree/master/login-microservice) | YSQL | Handles login and authentication of the users. *Note that this is still a work in progress.*
# Build and run
+## Build Jars with Maven
To build, simply run the following from the base directory:
```
$ mvn -DskipTests package
```
-To run the app, you need to first install YugaByte DB, create the necessary tables, start each of the microservices and finally the React UI.
-## Running the app
+## Build a Docker Image with Maven
-Make sure you have built the app as described above. Now do the following steps.
+To get started quickly, you can run Jib without even changing your pom.xml:
-## Step 1: Install and initialize YugaByte DB
-
-You can [install YugaByte DB by following these instructions](https://docs.yugabyte.com/latest/quick-start/).
+```
+$ ./mvnw com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=nchandrappa/cart-microservice
+```
-Now create the necessary tables as shown below. Note that these steps would take a few seconds.
+To push to a Docker registry you use the build goal, instead of dockerBuild, i.e.
```
-$ cd resources
-$ cqlsh -f schema.cql
+$ ./mvnw com.google.cloud.tools:jib-maven-plugin:build -Dimage=nchandrappa/cart-microservice
```
-Next, load some sample data.
+
+Note: Update docker image id to reflect the docker repository of your choice.
+
+
+## Running the app on Minikube
+
+To run the app on your local Minikube, you need to first install YugaByte DB, create the necessary tables, deploy microservices and the React UI.
+
+Make sure you have built the docker images as described above and you're in the `yugastore-java` base directory. Now do the following steps.
+
+
+## verify if minikube is running
```
-$ cd resources
-$ ./dataload.sh
+$ minikube status
```
-Create the postgres tables in `resources/schema.sql` for the YSQL tables.
+## Step 1: Install and initialize YugaByte DB
-## Step 2: Start the Eureka service discovery (local)
+You can [install YugaByte DB by following these instructions](https://docs.yugabyte.com/latest/quick-start/).
-You can do this as follows:
+a. Install YugabyteDB in minikube
```
-$ cd eureka-server-local/
-$ mvn spring-boot:run
+$ kubectl create -f k8s-deployments/util/default-rbac.yml
+$ kubectl create namespace yb-demo
+$ kubectl create -f k8s-deployments/Yugabyte/yugabyte-statefulset-rf-1.yaml -n yb-demo
+
```
-Verify this is running by browsing to the [Spring Eureka Service Discovery dashboard](http://localhost:8761/).
+b. Verify YugabyteDB installation by connecting to postgres terminal using the following command
-## Step 2: Start the api gateway microservice
+```
+$ kubectl -n yb-demo exec -it yb-tserver-0 /home/yugabyte/bin/ysqlsh -- -h yb-tserver-0 --echo-queries
+```
-To run the products microservice, do the following in a separate shell:
+c. find the YCQL and YSQL ip-address:port for YugabyteDB cluster by running the below command
```
-$ cd api-gateway-microservice/
-$ mvn spring-boot:run
+$ minikube service yb-db-service -n yb-demo
```
+set the following environment variables from above data. example:
-## Step 3: Start the products microservice
+```
+$ export CQLSH_HOST=192.168.64.3
+$ export CQLSH_PORT=31620
+$ export YSQLSH_HOST=192.168.64.3
+$ export YSQLSH_PORT=32517
+```
-To run the products microservice, do the following in a separate shell:
+d. Now create the necessary tables as shown below. Load sample dataset by following the steps [here](resources/README.md)
```
-$ cd products-microservice/
-$ mvn spring-boot:run
+$ cd resources
+$ cqlsh -f schema.cql
```
-## Step 4: Start the checkout microservice
-
-To run the products microservice, do the following in a separate shell:
+Next, load some sample data. Follow the data load steps in
```
-$ cd checkout-microservice/
-$ mvn spring-boot:run
+$ cd resources
+$ ./dataload.sh
```
-## Step 5: Start the checkout microservice
+Create the postgres tables in `resources/schema.sql` for the YSQL tables
-To run the cart microservice, do the following in a separate shell:
+```
+$ ysqlsh -h $YSQLSH_HOST -p $YSQLSH_PORT -d postgres -f schema.sql
+```
+
+## Step 2: Deploy yugastore-java microservices
```
-$ cd cart-microservice/
-$ mvn spring-boot:run
+$ kubectl create -f k8s-deployments/microservices/yugastore-deployment.yaml
```
-## Step 6: Start the UI
-To do this, simply run `npm start` from the `frontend` directory in a separate shell:
+## Step 3: browse to the marketplace app
```
-$ cd react-ui
-$ mvn spring-boot:run
+$ minikube service yugastore-ui
```
-Now browse to the marketplace app at [http://localhost:8080/](http://localhost:8080/).
+this command will open up Yugastore Dashboard.
+
+
+# Next Steps
+
+- [Deploy Yugastore on Istio enabled Kubernetes Cluster](k8s-deployoment-instructions.md)
+
+
+# Learn more
+- [Learn YugabyteDB](https://learn.yugabyte.com/)
+- [Contribute to YugabyteDB](https://www.yugabyte.com/community/)
+- [Contribute to Spring Data YugabyteDB](https://github.com/yugabyte/spring-data-yugabytedb)
diff --git a/api-gateway-microservice/.mvn/wrapper/MavenWrapperDownloader.java b/api-gateway-microservice/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000..72308aa
--- /dev/null
+++ b/api-gateway-microservice/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,114 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL =
+ "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: : " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/api-gateway-microservice/.mvn/wrapper/maven-wrapper.jar b/api-gateway-microservice/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..01e6799
Binary files /dev/null and b/api-gateway-microservice/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/api-gateway-microservice/.mvn/wrapper/maven-wrapper.properties b/api-gateway-microservice/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..cd0d451
--- /dev/null
+++ b/api-gateway-microservice/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
diff --git a/api-gateway-microservice/Dockerfile b/api-gateway-microservice/Dockerfile
new file mode 100644
index 0000000..e08873e
--- /dev/null
+++ b/api-gateway-microservice/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
diff --git a/api-gateway-microservice/application.yml b/api-gateway-microservice/application.yml
deleted file mode 100644
index dde0567..0000000
--- a/api-gateway-microservice/application.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-spring:
- application:
- name: api-gateway-microservice
\ No newline at end of file
diff --git a/api-gateway-microservice/deployment.yml b/api-gateway-microservice/deployment.yml
new file mode 100644
index 0000000..e5a69eb
--- /dev/null
+++ b/api-gateway-microservice/deployment.yml
@@ -0,0 +1,37 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: api-gateway
+ labels:
+ app: gateway
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: gateway
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: gateway
+ version: v1
+ spec:
+ containers:
+ - name: gateway
+ image: nchandrappa/api-gateway:latest
+ imagePullPolicy: Always
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: api-gateway
+spec:
+ selector:
+ app: gateway
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
diff --git a/api-gateway-microservice/mvnw b/api-gateway-microservice/mvnw
new file mode 100755
index 0000000..8b9da3b
--- /dev/null
+++ b/api-gateway-microservice/mvnw
@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ wget "$jarUrl" -O "$wrapperJarPath"
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ curl -o "$wrapperJarPath" "$jarUrl"
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/api-gateway-microservice/mvnw.cmd b/api-gateway-microservice/mvnw.cmd
new file mode 100644
index 0000000..fef5a8f
--- /dev/null
+++ b/api-gateway-microservice/mvnw.cmd
@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ echo Found %WRAPPER_JAR%
+) else (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+ echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/api-gateway-microservice/pom.xml b/api-gateway-microservice/pom.xml
index 78518f2..fad16f5 100644
--- a/api-gateway-microservice/pom.xml
+++ b/api-gateway-microservice/pom.xml
@@ -14,7 +14,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.0.4.RELEASE
+ 2.1.5.RELEASE
@@ -22,7 +22,7 @@
UTF-8
UTF-8
1.8
- Finchley.RELEASE
+ Greenwich.SR2
2.0.0.RELEASE
@@ -64,11 +64,6 @@
org.springframework.boot
spring-boot-devtools
-
-
- io.pivotal.spring.cloud
- spring-cloud-services-starter-config-client
-
org.springframework.boot
@@ -100,13 +95,13 @@
-
+
org.springframework.cloud
spring-cloud-dependencies
@@ -114,16 +109,55 @@
pom
import
-
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-kubernetes
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-ribbon
+
+
+ org.springframework.cloud
+ spring-cloud-starter-kubernetes-ribbon
+
+
+ org.springframework.cloud
+ spring-cloud-starter-openfeign
+
+
+ org.springframework.cloud
+ spring-cloud-openfeign-core
+
+
+ io.dekorate
+ kubernetes-spring-starter
+ 0.7.2
+
+
+ org.springframework.cloud
+ spring-cloud-kubernetes-istio
+
+
+
+
org.springframework.boot
spring-boot-starter-actuator
diff --git a/api-gateway-microservice/pom.xml.bkup b/api-gateway-microservice/pom.xml.bkup
new file mode 100644
index 0000000..78518f2
--- /dev/null
+++ b/api-gateway-microservice/pom.xml.bkup
@@ -0,0 +1,182 @@
+
+
+ 4.0.0
+
+ com.yugabyte.app.yugastore
+ api-gateway-microservice
+ 0.0.1-SNAPSHOT
+ jar
+
+ api-gateway-microservice
+ Gateway for all REST APIs for the retail marketplace app.
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.4.RELEASE
+
+
+
+
+ UTF-8
+ UTF-8
+ 1.8
+ Finchley.RELEASE
+ 2.0.0.RELEASE
+
+
+
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-dependencies
+ ${spring-cloud-services.version}
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ com.google.code.gson
+ gson
+
+
+ org.springframework.boot
+ spring-boot-devtools
+
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-starter-config-client
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-core
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-dependencies
+ 2.1.2.RELEASE
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Greenwich.RELEASE
+ pom
+ import
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-starter-service-registry
+ 2.1.2.RELEASE
+
+
+ org.springframework.cloud
+ spring-cloud-starter-feign
+ 1.4.6.RELEASE
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+
+
+
diff --git a/api-gateway-microservice/services.yml b/api-gateway-microservice/services.yml
new file mode 100644
index 0000000..bbfc65f
--- /dev/null
+++ b/api-gateway-microservice/services.yml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: gateway-lb
+spec:
+ type: LoadBalancer
+ selector:
+ app: gateway
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
index 47f7b3e..dbc3708 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
@@ -1,14 +1,50 @@
package com.yugabyte.app.yugastore;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Bean;
+import org.springframework.web.client.RestTemplate;
+
+import com.netflix.client.config.IClientConfig;
+import com.netflix.loadbalancer.AvailabilityFilteringRule;
+import com.netflix.loadbalancer.IPing;
+import com.netflix.loadbalancer.IRule;
+import com.netflix.loadbalancer.PingUrl;
@SpringBootApplication
+@EnableDiscoveryClient
@EnableFeignClients
+@RibbonClient(name = "cart-microservice", configuration = ShoppingCartServiceConfiguration.class)
public class YugabyteClientApplication {
public static void main(String[] args) {
SpringApplication.run(YugabyteClientApplication.class, args);
}
+
+ @LoadBalanced
+ @Bean
+ RestTemplate restTemplate() {
+ return new RestTemplate();
+ }
}
+
+class ShoppingCartServiceConfiguration {
+
+ @Autowired
+ IClientConfig ribbonClientConfig;
+
+ @Bean
+ public IPing ribbonPing(IClientConfig config) {
+ return new PingUrl();
+ }
+
+ @Bean
+ public IRule ribbonRule(IClientConfig config) {
+ return new AvailabilityFilteringRule();
+ }
+}
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/CustomRestMvcConfiguration.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/CustomRestMvcConfiguration.java
index ee8fa56..66debea 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/CustomRestMvcConfiguration.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/CustomRestMvcConfiguration.java
@@ -1,6 +1,7 @@
package com.yugabyte.app.yugastore.config;
import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.rest.core.config.RepositoryRestConfiguration;
import org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer;
@@ -8,6 +9,7 @@
import com.yugabyte.app.yugastore.domain.ProductMetadata;
import com.yugabyte.app.yugastore.domain.ProductRanking;
+import com.yugabyte.app.yugastore.rest.clients.ShoppingCartRestClient;
@Configuration
public class CustomRestMvcConfiguration {
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/FeignConfiguration.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/FeignConfiguration.java
new file mode 100644
index 0000000..5249c8e
--- /dev/null
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/config/FeignConfiguration.java
@@ -0,0 +1,11 @@
+package com.yugabyte.app.yugastore.config;
+
+import org.springframework.cloud.openfeign.FeignClientsConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Import(FeignClientsConfiguration.class)
+@Configuration
+public class FeignConfiguration {
+
+}
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/CheckoutRestClient.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/CheckoutRestClient.java
index 89348df..3e894fa 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/CheckoutRestClient.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/CheckoutRestClient.java
@@ -6,7 +6,7 @@
import com.yugabyte.app.yugastore.domain.CheckoutStatus;
-@FeignClient("checkout-microservice")
+//@FeignClient("checkout-microservice")
@RequestMapping("/checkout-microservice")
public interface CheckoutRestClient {
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ProductCatalogRestClient.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ProductCatalogRestClient.java
index a93fabc..9b87231 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ProductCatalogRestClient.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ProductCatalogRestClient.java
@@ -10,7 +10,7 @@
import com.yugabyte.app.yugastore.domain.ProductMetadata;
import com.yugabyte.app.yugastore.domain.ProductRanking;
-@FeignClient("products-microservice")
+//@FeignClient("products-microservice")
@RequestMapping("/products-microservice")
public interface ProductCatalogRestClient {
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartK8sRestClient.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartK8sRestClient.java
new file mode 100644
index 0000000..16f4436
--- /dev/null
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartK8sRestClient.java
@@ -0,0 +1,76 @@
+//package com.yugabyte.app.yugastore.rest.clients;
+//
+//import java.util.Map;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+//import org.springframework.cloud.netflix.ribbon.RibbonClient;
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.stereotype.Component;
+//import org.springframework.web.client.RestTemplate;
+//
+//import com.netflix.client.config.IClientConfig;
+//import com.netflix.loadbalancer.AvailabilityFilteringRule;
+//import com.netflix.loadbalancer.IPing;
+//import com.netflix.loadbalancer.IRule;
+//import com.netflix.loadbalancer.PingUrl;
+//
+//@RibbonClient(name = "cart-microservice", configuration = ShoppingCartServiceConfiguration.class)
+//@Component
+//public class ShoppingCartK8sRestClient {
+//
+//
+// @Autowired
+// RestTemplate restTemplate;
+//
+// @LoadBalanced
+// @Bean
+// RestTemplate restTemplate() {
+// return new RestTemplate();
+// }
+//
+// public String addProductToCart(String userId, String asin) {
+//
+// String result = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/addProduct", String.class);
+// return result;
+//
+// }
+//
+// @SuppressWarnings("unchecked")
+// public Map getProductsInCart(String userId) {
+//
+// Map productsInCart = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/productsInCart", Map.class);
+// return productsInCart;
+//
+// }
+//
+// public String removeProductFromCart(String userId, String asin) {
+//
+// String result = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/removeProduct", String.class);
+// return result;
+//
+// }
+//
+// public String clearCart(String userId) {
+//
+// String result = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/clearCart", String.class);
+// return result;
+// }
+//
+//}
+//
+//class ShoppingCartServiceConfiguration {
+//
+// @Autowired
+// IClientConfig ribbonClientConfig;
+//
+// @Bean
+// public IPing ribbonPing(IClientConfig config) {
+// return new PingUrl();
+// }
+//
+// @Bean
+// public IRule ribbonRule(IClientConfig config) {
+// return new AvailabilityFilteringRule();
+// }
+//}
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartRestClient.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartRestClient.java
index fac5a3a..a2304a9 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartRestClient.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/rest/clients/ShoppingCartRestClient.java
@@ -1,26 +1,109 @@
+//package com.yugabyte.app.yugastore.rest.clients;
+//
+//import java.util.Map;
+//
+//import org.springframework.cloud.openfeign.FeignClient;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.RequestParam;
+//
+////@FeignClient("cart-microservice")
+//@RequestMapping("/cart-microservice")
+//public interface ShoppingCartRestClient {
+//
+// @RequestMapping("/shoppingCart/addProduct")
+// String addProductToCart(@RequestParam("userid") String userId,
+// @RequestParam("asin") String asin);
+//
+// @RequestMapping("/shoppingCart/productsInCart")
+// Map getProductsInCart(@RequestParam("userid") String userId);
+//
+// @RequestMapping("/shoppingCart/removeProduct")
+// String removeProductFromCart(@RequestParam("userid") String userId,
+// @RequestParam("asin") String asin);
+//
+// @RequestMapping("/shoppingCart/clearCart")
+// String clearCart(@RequestParam("userid") String userId);
+//}
+
package com.yugabyte.app.yugastore.rest.clients;
import java.util.Map;
-import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+import com.netflix.client.config.IClientConfig;
+import com.netflix.loadbalancer.AvailabilityFilteringRule;
+import com.netflix.loadbalancer.IPing;
+import com.netflix.loadbalancer.IRule;
+import com.netflix.loadbalancer.PingUrl;
-@FeignClient("cart-microservice")
-@RequestMapping("/cart-microservice")
-public interface ShoppingCartRestClient {
+//@RibbonClient(name = "cart-microservice", configuration = ShoppingCartServiceConfiguration.class)
+@Component
+public class ShoppingCartRestClient {
+
+ private final RestTemplate restTemplate;
+
+ public ShoppingCartRestClient (RestTemplate restTemplate) {
+ this.restTemplate = restTemplate;
+ }
- @RequestMapping("/shoppingCart/addProduct")
- String addProductToCart(@RequestParam("userid") String userId,
- @RequestParam("asin") String asin);
+// @Autowired
+// RestTemplate restTemplate;
+//
+// @LoadBalanced
+// @Bean
+// RestTemplate restTemplate() {
+// return new RestTemplate();
+// }
- @RequestMapping("/shoppingCart/productsInCart")
- Map getProductsInCart(@RequestParam("userid") String userId);
+ public String addProductToCart(String userId, String asin) {
+
+ String result = this.restTemplate.getForObject(String.format(
+ "http://cart-microservice/shoppingCart/addProduct?userId=%s&asin=%s", userId, asin), String.class);
+ return result;
+
+ }
- @RequestMapping("/shoppingCart/removeProduct")
- String removeProductFromCart(@RequestParam("userid") String userId,
- @RequestParam("asin") String asin);
+ @SuppressWarnings("unchecked")
+ public Map getProductsInCart(String userId) {
+
+ Map productsInCart = this.restTemplate.getForObject(String.format(
+ "http://cart-microservice/shoppingCart/productsInCart?userId=%s", userId), Map.class);
+ return productsInCart;
+ }
- @RequestMapping("/shoppingCart/clearCart")
- String clearCart(@RequestParam("userid") String userId);
+ public String removeProductFromCart(String userId, String asin) {
+
+ String result = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/removeProduct", String.class);
+ return result;
+
+ }
+
+ public String clearCart(String userId) {
+
+ String result = this.restTemplate.getForObject("http://cart-microservice/shoppingCart/clearCart", String.class);
+ return result;
+ }
+
}
+
+//class ShoppingCartServiceConfiguration {
+//
+// @Autowired
+// IClientConfig ribbonClientConfig;
+//
+// @Bean
+// public IPing ribbonPing(IClientConfig config) {
+// return new PingUrl();
+// }
+//
+// @Bean
+// public IRule ribbonRule(IClientConfig config) {
+// return new AvailabilityFilteringRule();
+// }
+//}
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/CheckoutServiceRestImpl.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/CheckoutServiceRestImpl.java
index 7595e44..d25876c 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/CheckoutServiceRestImpl.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/CheckoutServiceRestImpl.java
@@ -1,5 +1,6 @@
package com.yugabyte.app.yugastore.service.impl;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;
@@ -7,17 +8,35 @@
import com.yugabyte.app.yugastore.domain.CheckoutStatus;
import com.yugabyte.app.yugastore.rest.clients.CheckoutRestClient;
+import com.yugabyte.app.yugastore.rest.clients.ProductCatalogRestClient;
import com.yugabyte.app.yugastore.service.CheckoutServiceRest;
+import feign.Client;
+import feign.Contract;
+import feign.Feign;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+
@Service
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class CheckoutServiceRestImpl implements CheckoutServiceRest {
private final CheckoutRestClient checkoutRestClient;
- public CheckoutServiceRestImpl(CheckoutRestClient checkoutRestClient) {
- this.checkoutRestClient = checkoutRestClient;
- }
+// public CheckoutServiceRestImpl(CheckoutRestClient checkoutRestClient) {
+// this.checkoutRestClient = checkoutRestClient;
+// }
+
+ @Autowired
+ public CheckoutServiceRestImpl(Decoder decoder, Encoder encoder, Client client,
+ Contract contract) {
+ this.checkoutRestClient = Feign.builder().client(client)
+ .encoder(encoder)
+ .decoder(decoder)
+ .contract(contract)
+ .target(CheckoutRestClient.class,
+ "http://checkout-microservice");
+ }
@Override
public CheckoutStatus checkout() {
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ProductCatalogServiceRestImpl.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ProductCatalogServiceRestImpl.java
index b7477f1..2dba5e5 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ProductCatalogServiceRestImpl.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ProductCatalogServiceRestImpl.java
@@ -13,15 +13,32 @@
import com.yugabyte.app.yugastore.rest.clients.ProductCatalogRestClient;
import com.yugabyte.app.yugastore.service.ProductCatalogServiceRest;
+import feign.Client;
+import feign.Contract;
+import feign.Feign;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+
@Service
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class ProductCatalogServiceRestImpl implements ProductCatalogServiceRest {
private final ProductCatalogRestClient productCatalogRestClient;
+// @Autowired
+// public ProductCatalogServiceRestImpl(ProductCatalogRestClient productCatalogRestClient) {
+// this.productCatalogRestClient = productCatalogRestClient;
+// }
+
@Autowired
- public ProductCatalogServiceRestImpl(ProductCatalogRestClient productCatalogRestClient) {
- this.productCatalogRestClient = productCatalogRestClient;
+ public ProductCatalogServiceRestImpl(Decoder decoder, Encoder encoder, Client client,
+ Contract contract) {
+ this.productCatalogRestClient = Feign.builder().client(client)
+ .encoder(encoder)
+ .decoder(decoder)
+ .contract(contract)
+ .target(ProductCatalogRestClient.class,
+ "http://products-microservice");
}
@Override
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceK8sImpl.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceK8sImpl.java
new file mode 100644
index 0000000..f45323e
--- /dev/null
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceK8sImpl.java
@@ -0,0 +1,57 @@
+//package com.yugabyte.app.yugastore.service.impl;
+//
+//import java.util.Map;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Scope;
+//import org.springframework.context.annotation.ScopedProxyMode;
+//import org.springframework.stereotype.Service;
+//import org.springframework.web.context.WebApplicationContext;
+//
+//import com.yugabyte.app.yugastore.rest.clients.ShoppingCartK8sRestClient;
+//
+//@Service
+//@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
+//public class ShoppingCartServiceK8sImpl {
+//
+// private final ShoppingCartK8sRestClient shoppingCartRestClient;
+//
+// @Autowired
+// public ShoppingCartServiceK8sImpl(ShoppingCartK8sRestClient shoppingCartRestClient) {
+// this.shoppingCartRestClient = shoppingCartRestClient;
+// }
+//
+//// @Autowired
+//// public ShoppingCartServiceRestImpl(Decoder decoder, Encoder encoder, Client client,
+//// Contract contract) {
+//// this.shoppingCartRestClient = Feign.builder().client(client)
+//// .encoder(encoder)
+//// .decoder(decoder)
+//// .contract(contract)
+//// .target(ShoppingCartRestClient.class,
+//// "http://cart-microservice");
+//// }
+//
+// public String addProduct(String userId, String asin) {
+//
+// String result = shoppingCartRestClient.addProductToCart(userId, asin);
+// return result;
+// }
+//
+// public Map getProductsInCart(String userId) {
+//
+// Map productsInCart = shoppingCartRestClient.getProductsInCart(userId);
+// return productsInCart;
+// }
+//
+// public String removeProduct(String userId, String asin) {
+// String result = shoppingCartRestClient.removeProductFromCart(userId, asin);
+// return result;
+// }
+//
+// public String clearCart(String userId) {
+// String result = shoppingCartRestClient.clearCart(userId);
+// return result;
+// }
+//
+//}
diff --git a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceRestImpl.java b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceRestImpl.java
index 7019d72..a35521f 100644
--- a/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceRestImpl.java
+++ b/api-gateway-microservice/src/main/java/com/yugabyte/app/yugastore/service/impl/ShoppingCartServiceRestImpl.java
@@ -1,8 +1,79 @@
+//package com.yugabyte.app.yugastore.service.impl;
+//
+//import java.util.Map;
+//
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.context.annotation.Scope;
+//import org.springframework.context.annotation.ScopedProxyMode;
+//import org.springframework.stereotype.Service;
+//import org.springframework.web.context.WebApplicationContext;
+//
+//import com.yugabyte.app.yugastore.rest.clients.ProductCatalogRestClient;
+//import com.yugabyte.app.yugastore.rest.clients.ShoppingCartRestClient;
+//import com.yugabyte.app.yugastore.service.ShoppingCartServiceRest;
+//
+//import feign.Client;
+//import feign.Contract;
+//import feign.Feign;
+//import feign.codec.Decoder;
+//import feign.codec.Encoder;
+//
+//@Service
+//@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
+//public class ShoppingCartServiceRestImpl implements ShoppingCartServiceRest {
+//
+// private final ShoppingCartRestClient shoppingCartRestClient;
+//
+//// @Autowired
+//// public ShoppingCartServiceRestImpl(ShoppingCartRestClient shoppingCartRestClient) {
+//// this.shoppingCartRestClient = shoppingCartRestClient;
+//// }
+//
+// @Autowired
+// public ShoppingCartServiceRestImpl(Decoder decoder, Encoder encoder, Client client,
+// Contract contract) {
+// this.shoppingCartRestClient = Feign.builder().client(client)
+// .encoder(encoder)
+// .decoder(decoder)
+// .contract(contract)
+// .target(ShoppingCartRestClient.class,
+// "http://cart-microservice");
+// }
+//
+// @Override
+// public String addProduct(String userId, String asin) {
+//
+// String result = shoppingCartRestClient.addProductToCart(userId, asin);
+// return result;
+// }
+//
+// @Override
+// public Map getProductsInCart(String userId) {
+//
+// Map productsInCart = shoppingCartRestClient.getProductsInCart(userId);
+// return productsInCart;
+// }
+//
+// @Override
+// public String removeProduct(String userId, String asin) {
+// String result = shoppingCartRestClient.removeProductFromCart(userId, asin);
+// return result;
+// }
+//
+// @Override
+// public String clearCart(String userId) {
+// String result = shoppingCartRestClient.clearCart(userId);
+// return result;
+// }
+//
+//}
+
package com.yugabyte.app.yugastore.service.impl;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.DependsOn;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;
@@ -11,6 +82,8 @@
import com.yugabyte.app.yugastore.rest.clients.ShoppingCartRestClient;
import com.yugabyte.app.yugastore.service.ShoppingCartServiceRest;
+
+
@Service
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
public class ShoppingCartServiceRestImpl implements ShoppingCartServiceRest {
@@ -18,34 +91,41 @@ public class ShoppingCartServiceRestImpl implements ShoppingCartServiceRest {
private final ShoppingCartRestClient shoppingCartRestClient;
@Autowired
- public ShoppingCartServiceRestImpl(ShoppingCartRestClient shoppingCartRestClient) {
+ public ShoppingCartServiceRestImpl (ShoppingCartRestClient shoppingCartRestClient) {
this.shoppingCartRestClient = shoppingCartRestClient;
}
+
+// @Autowired
+// public ShoppingCartServiceRestImpl(Decoder decoder, Encoder encoder, Client client,
+// Contract contract) {
+// this.shoppingCartRestClient = Feign.builder().client(client)
+// .encoder(encoder)
+// .decoder(decoder)
+// .contract(contract)
+// .target(ShoppingCartRestClient.class,
+// "http://cart-microservice");
+// }
- @Override
public String addProduct(String userId, String asin) {
String result = shoppingCartRestClient.addProductToCart(userId, asin);
return result;
}
- @Override
public Map getProductsInCart(String userId) {
Map productsInCart = shoppingCartRestClient.getProductsInCart(userId);
return productsInCart;
}
- @Override
public String removeProduct(String userId, String asin) {
String result = shoppingCartRestClient.removeProductFromCart(userId, asin);
return result;
}
- @Override
public String clearCart(String userId) {
String result = shoppingCartRestClient.clearCart(userId);
return result;
}
-}
\ No newline at end of file
+}
diff --git "a/api-gateway-microservice/src/main/resources/application-kubernetes.yml\n" "b/api-gateway-microservice/src/main/resources/application-kubernetes.yml\n"
new file mode 100644
index 0000000..4d86454
--- /dev/null
+++ "b/api-gateway-microservice/src/main/resources/application-kubernetes.yml\n"
@@ -0,0 +1,15 @@
+spring:
+ cloud:
+ kubernetes:
+ enabled: true
+ reload:
+ enabled: true
+eureka:
+ client:
+ enabled: false
+
+dekorate:
+ kubernetes:
+ serviceType: NodePort
+ imagePullPolicy: Always
+ group: nchandrappa
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/resources/application.properties b/api-gateway-microservice/src/main/resources/application.properties
index 8b13789..8fadace 100644
--- a/api-gateway-microservice/src/main/resources/application.properties
+++ b/api-gateway-microservice/src/main/resources/application.properties
@@ -1 +1,2 @@
-
+logging.level.=INFO
+logging.level.project.user.UserClient: DEBUG
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/resources/application.yml b/api-gateway-microservice/src/main/resources/application.yml
new file mode 100644
index 0000000..69f5536
--- /dev/null
+++ b/api-gateway-microservice/src/main/resources/application.yml
@@ -0,0 +1,21 @@
+spring:
+ application:
+ name: api-gateway-microservice
+ cloud:
+ kubernetes:
+ enabled: true
+ reload:
+ enabled: true
+ gateway:
+ discovery:
+ locator:
+ lowerCaseServiceId: true
+ enabled: true
+eureka:
+ client:
+ enabled: false
+dekorate:
+ kubernetes:
+ serviceType: NodePort
+ imagePullPolicy: Always
+ group: nchandrappa
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/resources/bootstrap.yml b/api-gateway-microservice/src/main/resources/bootstrap.yml
deleted file mode 100644
index 084dfb9..0000000
--- a/api-gateway-microservice/src/main/resources/bootstrap.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-spring:
- application:
- name: api-gateway-microservice
-server:
- port: 8081
-eureka:
- client:
- serviceUrl:
- defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
diff --git a/api-gateway-microservice/src/main/resources/bootstrap.yml.bkup b/api-gateway-microservice/src/main/resources/bootstrap.yml.bkup
new file mode 100644
index 0000000..2d120bf
--- /dev/null
+++ b/api-gateway-microservice/src/main/resources/bootstrap.yml.bkup
@@ -0,0 +1,17 @@
+spring:
+ application:
+ name: api-gateway-microservice
+ cloud:
+ kubernetes:
+ enabled: false
+ gateway:
+ discovery:
+ locator:
+ lowerCaseServiceId: true
+ enabled: true
+#server:
+# port: 8081
+#eureka:
+# client:
+# serviceUrl:
+# defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
diff --git a/api-gateway-microservice/yugastore-rbac.yml b/api-gateway-microservice/yugastore-rbac.yml
new file mode 100644
index 0000000..5314f01
--- /dev/null
+++ b/api-gateway-microservice/yugastore-rbac.yml
@@ -0,0 +1,15 @@
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: yugastore-rbac
+subjects:
+ - kind: ServiceAccount
+ # Reference to upper's `metadata.name`
+ name: default
+ # Reference to upper's `metadata.namespace`
+ namespace: default
+roleRef:
+ kind: ClusterRole
+ name: cluster-admin
+ apiGroup: rbac.authorization.k8s.io
diff --git a/cart-microservice-v1/.gitignore b/cart-microservice-v1/.gitignore
new file mode 100644
index 0000000..a2a3040
--- /dev/null
+++ b/cart-microservice-v1/.gitignore
@@ -0,0 +1,31 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**
+!**/src/test/**
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+
+### VS Code ###
+.vscode/
diff --git a/cart-microservice-v1/.mvn/wrapper/MavenWrapperDownloader.java b/cart-microservice-v1/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000..e76d1f3
--- /dev/null
+++ b/cart-microservice-v1/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2007-present the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import java.net.*;
+import java.io.*;
+import java.nio.channels.*;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ private static final String WRAPPER_VERSION = "0.5.6";
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/"
+ + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) {
+ String username = System.getenv("MVNW_USERNAME");
+ char[] password = System.getenv("MVNW_PASSWORD").toCharArray();
+ Authenticator.setDefault(new Authenticator() {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(username, password);
+ }
+ });
+ }
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/cart-microservice-v1/.mvn/wrapper/maven-wrapper.jar b/cart-microservice-v1/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..2cc7d4a
Binary files /dev/null and b/cart-microservice-v1/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/cart-microservice-v1/.mvn/wrapper/maven-wrapper.properties b/cart-microservice-v1/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..642d572
--- /dev/null
+++ b/cart-microservice-v1/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,2 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
diff --git a/cart-microservice-v1/Dockerfile b/cart-microservice-v1/Dockerfile
new file mode 100644
index 0000000..4359da5
--- /dev/null
+++ b/cart-microservice-v1/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
\ No newline at end of file
diff --git a/cart-microservice-v1/config-map.yml b/cart-microservice-v1/config-map.yml
new file mode 100644
index 0000000..c1aca0a
--- /dev/null
+++ b/cart-microservice-v1/config-map.yml
@@ -0,0 +1,6 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: cart-microservice-v1-properties
+data:
+ spring.datasource.url: jdbc:postgresql://yb-tservers.yb-demo.svc.cluster.local:5433/postgres
diff --git a/cart-microservice-v1/deployment.yml b/cart-microservice-v1/deployment.yml
new file mode 100644
index 0000000..6395cdc
--- /dev/null
+++ b/cart-microservice-v1/deployment.yml
@@ -0,0 +1,42 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: cart-microservice
+ labels:
+ app: gateway
+ service: cart-microservice
+spec:
+ selector:
+ app: cart
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: cart-microservice-v1
+ labels:
+ app: cart
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: cart
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: cart
+ version: v1
+ spec:
+ containers:
+ - name: cart
+ image: nchandrappa/cart-microservice-v1:latest
+ envFrom:
+ - configMapRef:
+ name: cart-microservice-v1-properties
+ ports:
+ - containerPort: 8080
\ No newline at end of file
diff --git a/cart-microservice-v1/mvnw b/cart-microservice-v1/mvnw
new file mode 100755
index 0000000..a16b543
--- /dev/null
+++ b/cart-microservice-v1/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/cart-microservice-v1/mvnw.cmd b/cart-microservice-v1/mvnw.cmd
new file mode 100644
index 0000000..c8d4337
--- /dev/null
+++ b/cart-microservice-v1/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/cart-microservice-v1/pom.xml b/cart-microservice-v1/pom.xml
new file mode 100644
index 0000000..74f7d60
--- /dev/null
+++ b/cart-microservice-v1/pom.xml
@@ -0,0 +1,71 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.4.RELEASE
+
+
+ com.yugabyte.app.yugastore
+ cart-microservice-v1
+ 0.0.1-SNAPSHOT
+ cart-microservice-v1
+ shopping cart microservice
+
+
+ 1.8
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.postgresql
+ postgresql
+ 9.4-1206-jdbc42
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
\ No newline at end of file
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/CartMicroserviceApplication.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/CartMicroserviceApplication.java
new file mode 100644
index 0000000..11a6fd0
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/CartMicroserviceApplication.java
@@ -0,0 +1,13 @@
+package com.yugabyte.app.yugastore.cart;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class CartMicroserviceApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(CartMicroserviceApplication.class, args);
+ }
+
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/controller/ShoppingCartController.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/controller/ShoppingCartController.java
new file mode 100644
index 0000000..a39985a
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/controller/ShoppingCartController.java
@@ -0,0 +1,45 @@
+package com.yugabyte.app.yugastore.cart.controller;
+
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.yugabyte.app.yugastore.cart.service.ShoppingCartImpl;
+
+@RestController
+@RequestMapping(value = "/cart-microservice")
+public class ShoppingCartController {
+
+ @Autowired
+ ShoppingCartImpl shoppingCart;
+
+ @RequestMapping(method = RequestMethod.GET, value = "/shoppingCart/addProduct", produces = "application/json")
+ public String addProductToCart(@RequestParam("userid") String userId,
+ @RequestParam("asin") String asin) {
+ shoppingCart.addProductToShoppingCart(userId, asin);
+ return String.format("Added to Cart");
+ }
+
+ @RequestMapping(method = RequestMethod.GET, value = "/shoppingCart/productsInCart", produces = "application/json")
+ public Map getProductsInCart(@RequestParam("userid") String userId) {
+ return shoppingCart.getProductsInCart(userId);
+ }
+
+ @RequestMapping(method = RequestMethod.GET, value = "/shoppingCart/removeProduct", produces = "application/json")
+ public String removeProductFromCart(@RequestParam("userid") String userId,
+ @RequestParam("asin") String asin) {
+ shoppingCart.removeProductFromCart(userId, asin);
+ return String.format("Removing from Cart");
+ }
+
+ @RequestMapping(method = RequestMethod.GET, value = "/shoppingCart/clearCart", produces = "application/json")
+ public String clearCart(@RequestParam("userid") String userId) {
+ shoppingCart.clearCart(userId);
+ return String.format("Clearing Cart, Checkout successful");
+ }
+
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCart.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCart.java
new file mode 100644
index 0000000..a49c8d3
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCart.java
@@ -0,0 +1,71 @@
+package com.yugabyte.app.yugastore.cart.domain;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+@Entity(name = "shopping_cart")
+@Table(name = "shopping_cart")
+public class ShoppingCart {
+
+// @EmbeddedId
+// private ShoppingCartKey shoppingCartKey;
+
+ @Id
+ @Column(name = "cart_key")
+ private String cartKey;
+
+ @Column(name = "user_id")
+ private String userId;
+
+ @Column(name = "asin")
+ private String asin;
+
+ @Column(name = "time_added")
+ private String time_added;
+
+ @Column(name = "quantity")
+ private int quantity;
+
+ public String getCartKey() {
+ return cartKey;
+ }
+
+ public void setCartKey(String cartKey) {
+ this.cartKey = cartKey;
+ }
+
+ public String getUserId() {
+ return userId;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ public String getAsin() {
+ return asin;
+ }
+
+ public void setAsin(String asin) {
+ this.asin = asin;
+ }
+
+ public String getTime_added() {
+ return time_added;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setTime_added(String time_added) {
+ this.time_added = time_added;
+ }
+
+ public void setQuantity(int quantity) {
+ this.quantity = quantity;
+ }
+
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCartKey.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCartKey.java
new file mode 100644
index 0000000..45865fc
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/domain/ShoppingCartKey.java
@@ -0,0 +1,77 @@
+package com.yugabyte.app.yugastore.cart.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class ShoppingCartKey implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 343234890377423559L;
+
+ @Column(name = "user_id")
+ private String id;
+
+ @Column(name = "asin")
+ private String asin;
+
+ public ShoppingCartKey() {
+
+ }
+
+ public ShoppingCartKey(String id, String asin) {
+ this.id = id;
+ this.asin = asin;
+ }
+
+ public String getAsin() {
+ return asin;
+ }
+
+ public void setAsin(String asin) {
+ this.asin = asin;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : asin.hashCode());
+ result = prime * result + ((asin == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ShoppingCartKey other = (ShoppingCartKey) obj;
+ if (id == null) {
+ if (other.id != null)
+ return false;
+ else {
+ if (!id.equals(other.id)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/repositories/ShoppingCartRepository.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/repositories/ShoppingCartRepository.java
new file mode 100644
index 0000000..c99039c
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/repositories/ShoppingCartRepository.java
@@ -0,0 +1,39 @@
+package com.yugabyte.app.yugastore.cart.repositories;
+
+import java.util.List;
+import java.util.Optional;
+
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.CrudRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+import org.springframework.transaction.annotation.Transactional;
+
+import com.yugabyte.app.yugastore.cart.domain.ShoppingCart;
+
+
+@RepositoryRestResource
+public interface ShoppingCartRepository extends CrudRepository {
+
+ @Modifying
+ @Transactional
+ @Query("UPDATE shopping_cart SET quantity = quantity + 1 WHERE user_id = ?1 AND asin =?2")
+ int updateQuantityForShoppingCart(String userId, String asin);
+
+ @Query("SELECT quantity FROM shopping_cart WHERE user_id = ?1 AND asin = ?2")
+ Optional findByUserIdAndAsin(String userId, String asin);
+
+ @Query("SELECT sc FROM shopping_cart sc WHERE sc.userId = ?1")
+ Optional> findProductsInCartByUserId(String userId);
+
+ @Modifying
+ @Transactional
+ @Query("UPDATE shopping_cart SET quantity = quantity - 1 WHERE user_id = ?1 AND asin =?2")
+ int decrementQuantityForShoppingCart(String userId, String asin);
+
+ @Modifying
+ @Transactional
+ @Query("DELETE FROM shopping_cart WHERE user_id = ?1")
+ int deleteProductsInCartByUserId(String userId);
+
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/security/SecurityConfiguration.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/security/SecurityConfiguration.java
new file mode 100644
index 0000000..0dca43f
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/security/SecurityConfiguration.java
@@ -0,0 +1,18 @@
+package com.yugabyte.app.yugastore.cart.security;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+
+@Configuration
+public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
+
+ @Override
+ protected void configure(HttpSecurity http) throws Exception {
+ http
+ .authorizeRequests().anyRequest().permitAll()
+ .and()
+ .httpBasic().disable()
+ .csrf().disable();
+ }
+}
diff --git a/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/service/ShoppingCartImpl.java b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/service/ShoppingCartImpl.java
new file mode 100644
index 0000000..6a4df50
--- /dev/null
+++ b/cart-microservice-v1/src/main/java/com/yugabyte/app/yugastore/cart/service/ShoppingCartImpl.java
@@ -0,0 +1,100 @@
+package com.yugabyte.app.yugastore.cart.service;
+
+import java.time.LocalDateTime;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Scope;
+import org.springframework.context.annotation.ScopedProxyMode;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.context.WebApplicationContext;
+
+import com.yugabyte.app.yugastore.cart.domain.ShoppingCart;
+import com.yugabyte.app.yugastore.cart.domain.ShoppingCartKey;
+import com.yugabyte.app.yugastore.cart.repositories.ShoppingCartRepository;
+
+@Service
+@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
+@Transactional
+public class ShoppingCartImpl {
+
+ private static final int DEFAULT_QUANTITY = 1;
+ private final ShoppingCartRepository shoppingCartRepository;
+
+ @Autowired
+ public ShoppingCartImpl(ShoppingCartRepository shoppingCartRepository) {
+ this.shoppingCartRepository = shoppingCartRepository;
+ }
+
+ /**
+ * If product is in the map just increment quantity by 1. If product is not in
+ * the map with, add it with quantity 1
+ *
+ * @param product
+ */
+ public void addProductToShoppingCart(String userId, String asin) {
+
+ ShoppingCartKey currentKey = new ShoppingCartKey(userId, asin);
+ String shoppingCartKeyStr = userId + "-" + asin;
+ if (shoppingCartRepository.findById(shoppingCartKeyStr).isPresent()) {
+ shoppingCartRepository.updateQuantityForShoppingCart(userId, asin);
+ System.out.println("Adding product: " + asin);
+ } else {
+ ShoppingCart currentShoppingCart = createCartObject(currentKey);
+ shoppingCartRepository.save(currentShoppingCart);
+ System.out.println("Adding product: " + asin);
+ }
+ }
+
+ public Map getProductsInCart(String userId) {
+
+ Map productsInCartAsin = new HashMap();
+
+ if (shoppingCartRepository.findProductsInCartByUserId(userId).isPresent()) {
+
+ List productsInCart = shoppingCartRepository.findProductsInCartByUserId(userId).get();
+ for (ShoppingCart item : productsInCart) {
+ productsInCartAsin.put(item.getAsin(), item.getQuantity());
+ }
+
+ }
+ return productsInCartAsin;
+ }
+
+ public void removeProductFromCart(String userId, String asin) {
+ String shoppingCartKeyStr = userId + "-" + asin;
+ if (shoppingCartRepository.findById(shoppingCartKeyStr).isPresent()) {
+ if (shoppingCartRepository.findById(shoppingCartKeyStr).get().getQuantity() > 1) {
+ shoppingCartRepository.decrementQuantityForShoppingCart(userId, asin);
+ System.out.println("Decrementing product: " + asin + " quantity");
+ } else if (shoppingCartRepository.findById(shoppingCartKeyStr).get().getQuantity() == 1) {
+ shoppingCartRepository.deleteById(shoppingCartKeyStr);
+ System.out.println("Removing product: " + asin + " since it was qty 1");
+ }
+ }
+ }
+
+ private ShoppingCart createCartObject(ShoppingCartKey currentKey) {
+ ShoppingCart currentShoppingCart = new ShoppingCart();
+ currentShoppingCart.setCartKey(currentKey.getId() + "-" + currentKey.getAsin());
+ currentShoppingCart.setUserId(currentKey.getId());
+ currentShoppingCart.setAsin(currentKey.getAsin());
+ LocalDateTime currentTime = LocalDateTime.now();
+ currentShoppingCart.setTime_added(currentTime.toString());
+ currentShoppingCart.setQuantity(DEFAULT_QUANTITY);
+
+ return currentShoppingCart;
+ }
+
+ public void clearCart(String userId) {
+
+ if (shoppingCartRepository.findProductsInCartByUserId(userId).isPresent()) {
+ shoppingCartRepository.deleteProductsInCartByUserId(userId);
+ System.out.println("Deleteing all products for user: " + userId + " since checkout was successful");
+ }
+ }
+
+}
diff --git a/cart-microservice-v1/src/main/resources/application.properties b/cart-microservice-v1/src/main/resources/application.properties
new file mode 100644
index 0000000..814b24f
--- /dev/null
+++ b/cart-microservice-v1/src/main/resources/application.properties
@@ -0,0 +1,11 @@
+spring.jpa.database=POSTGRESQL
+spring.data.jpa.repositories.enabled=true
+spring.datasource.url=jdbc:postgresql://35.245.245.126:5433/postgres
+spring.datasource.username=postgres
+spring.datasource.password=
+spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
+#logging.level.org.hibernate.SQL=DEBUG
+#logging.level.org.hibernate.type=trace
+#logging.level.org.hibernate.type.descriptor.BasicBinder=TRACE
+#logging.level.=DEBUG
+
diff --git a/cart-microservice/Dockerfile b/cart-microservice/Dockerfile
new file mode 100644
index 0000000..e08873e
--- /dev/null
+++ b/cart-microservice/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
diff --git a/cart-microservice/config-map.yml b/cart-microservice/config-map.yml
new file mode 100644
index 0000000..3ba62eb
--- /dev/null
+++ b/cart-microservice/config-map.yml
@@ -0,0 +1,6 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: cart-microservice-properties
+data:
+ yugabyte.sql.datasource.url: jdbc:postgresql://yb-tservers.yb-demo.svc.cluster.local:5433/postgres
diff --git a/cart-microservice/deployment.yml b/cart-microservice/deployment.yml
new file mode 100644
index 0000000..281eab3
--- /dev/null
+++ b/cart-microservice/deployment.yml
@@ -0,0 +1,39 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: cart-microservice-v2
+ labels:
+ app: cart
+ version: v2
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: cart
+ version: v2
+ template:
+ metadata:
+ labels:
+ app: cart
+ version: v2
+ spec:
+ containers:
+ - name: cart
+ image: nchandrappa/cart-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: cart-microservice-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: cart-microservice
+spec:
+ selector:
+ app: cart
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
\ No newline at end of file
diff --git a/cart-microservice/pom.xml b/cart-microservice/pom.xml
index 87a1fe4..aa4bdd7 100644
--- a/cart-microservice/pom.xml
+++ b/cart-microservice/pom.xml
@@ -32,35 +32,21 @@
spring-boot-starter-web
-
+
+ 9.4-1206-jdbc42
+ -->
+
+ com.yugabyte
+ ysql
+ 42.2.7-yb-2
org.springframework.boot
spring-boot-starter-test
test
-
- io.pivotal.spring.cloud
- spring-cloud-services-dependencies
- 2.1.2.RELEASE
- pom
- import
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- Greenwich.RELEASE
- pom
- import
-
-
- io.pivotal.spring.cloud
- spring-cloud-services-starter-service-registry
- 2.1.2.RELEASE
-
org.springframework.boot
spring-boot-starter-actuator
diff --git a/cart-microservice/pom.xml.bckp b/cart-microservice/pom.xml.bckp
new file mode 100644
index 0000000..1e8468d
--- /dev/null
+++ b/cart-microservice/pom.xml.bckp
@@ -0,0 +1,94 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.1.4.RELEASE
+
+
+ com.yugabyte.app.yugastore
+ cart-microservice
+ 0.0.1-SNAPSHOT
+ cart-microservice
+ shopping cart microservice
+
+
+ 1.8
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+
+ com.yugabyte
+ ysql
+ 42.2.7-yb-1-SNAPSHOT
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-dependencies
+ 2.1.2.RELEASE
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Greenwich.RELEASE
+ pom
+ import
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-starter-service-registry
+ 2.1.2.RELEASE
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
diff --git a/cart-microservice/service.yml b/cart-microservice/service.yml
new file mode 100644
index 0000000..13164dc
--- /dev/null
+++ b/cart-microservice/service.yml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: cart-service-lb
+spec:
+ selector:
+ app: cart
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+ type: LoadBalancer
diff --git a/cart-microservice/src/main/java/com/yugabyte/app/yugastore/cart/config/YugabyteDataSourceConfig.java b/cart-microservice/src/main/java/com/yugabyte/app/yugastore/cart/config/YugabyteDataSourceConfig.java
new file mode 100644
index 0000000..655c92b
--- /dev/null
+++ b/cart-microservice/src/main/java/com/yugabyte/app/yugastore/cart/config/YugabyteDataSourceConfig.java
@@ -0,0 +1,21 @@
+package com.yugabyte.app.yugastore.cart.config;
+
+import javax.sql.DataSource;
+
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.yugabyte.ysql.YBClusterAwareDataSource;
+
+@Configuration
+public class YugabyteDataSourceConfig {
+
+ @Value("${yugabyte.sql.datasource.url}")
+ String jdbcUrl;
+
+ @Bean
+ public DataSource getDataSource() {
+ return new YBClusterAwareDataSource(jdbcUrl);
+ }
+}
diff --git a/cart-microservice/src/main/resources/application.properties b/cart-microservice/src/main/resources/application.properties
index fec4ed9..37d06ca 100644
--- a/cart-microservice/src/main/resources/application.properties
+++ b/cart-microservice/src/main/resources/application.properties
@@ -1,10 +1,13 @@
spring.jpa.database=POSTGRESQL
spring.data.jpa.repositories.enabled=true
-spring.datasource.url=jdbc:postgresql://127.0.0.1:5433/postgres
+#yugabyte.sql.datasource.url=jdbc:postgresql://127.0.0.1:5433/postgres
+yugabyte.sql.datasource.url=jdbc:postgresql://35.245.245.126:5433/postgres
spring.datasource.username=postgres
spring.datasource.password=
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
-logging.level.org.hibernate.SQL=DEBUG
-logging.level.org.hibernate.type=trace
-logging.level.org.hibernate.type.descriptor.BasicBinder=TRACE
-logging.level.=DEBUG
+spring.jpa.hibernate.ddl-auto = update
+# logging.level.=DEBUG
+# logging.level.org.hibernate.SQL=DEBUG
+# logging.level.org.hibernate.type=trace
+# logging.level.org.hibernate.type.descriptor.BasicBinder=TRACE
+# logging.level.=DEBUG
diff --git a/checkout-microservice/Dockerfile b/checkout-microservice/Dockerfile
new file mode 100644
index 0000000..e08873e
--- /dev/null
+++ b/checkout-microservice/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
diff --git a/checkout-microservice/application.yml b/checkout-microservice/application.yml
deleted file mode 100644
index 2747771..0000000
--- a/checkout-microservice/application.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-spring:
- application:
- name: checkout-microservice
\ No newline at end of file
diff --git a/checkout-microservice/config-map.yml b/checkout-microservice/config-map.yml
new file mode 100644
index 0000000..45e14ff
--- /dev/null
+++ b/checkout-microservice/config-map.yml
@@ -0,0 +1,8 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: checkout-microservice-properties
+data:
+ spring.data.cassandra.keyspace-name: cronos
+ spring.data.cassandra.contact-points: yb-tservers.yb-demo.svc.cluster.local
+ spring.data.cassandra.port: "9042"
diff --git a/checkout-microservice/deployment.yml b/checkout-microservice/deployment.yml
new file mode 100644
index 0000000..4482882
--- /dev/null
+++ b/checkout-microservice/deployment.yml
@@ -0,0 +1,39 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: checkout-microservice
+ labels:
+ app: checkout
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: checkout
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: checkout
+ version: v1
+ spec:
+ containers:
+ - name: checkout
+ image: nchandrappa/checkout-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: checkout-microservice-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: checkout-microservice
+spec:
+ selector:
+ app: checkout
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
diff --git a/checkout-microservice/logs.txt b/checkout-microservice/logs.txt
new file mode 100644
index 0000000..7694b41
--- /dev/null
+++ b/checkout-microservice/logs.txt
@@ -0,0 +1,1527 @@
+[INFO] Scanning for projects...
+[WARNING]
+[WARNING] Some problems were encountered while building the effective model for com.yugabyte.app.yugastore:checkout-microservice:jar:0.0.1-SNAPSHOT
+[WARNING] 'dependencies.dependency.scope' for org.springframework.cloud:spring-cloud-dependencies:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 85, column 20
+[WARNING]
+[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
+[WARNING]
+[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
+[WARNING]
+[INFO]
+[INFO] ----------< com.yugabyte.app.yugastore:checkout-microservice >----------
+[INFO] Building checkout-microservice 0.0.1-SNAPSHOT
+[INFO] --------------------------------[ jar ]---------------------------------
+[INFO]
+[INFO] >>> spring-boot-maven-plugin:2.1.4.RELEASE:run (default-cli) > test-compile @ checkout-microservice >>>
+[INFO]
+[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ checkout-microservice ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] Copying 1 resource
+[INFO] Copying 1 resource
+[INFO]
+[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ checkout-microservice ---
+[INFO] Changes detected - recompiling the module!
+[INFO] Compiling 18 source files to /Users/nchandrappa/Documents/2019/yb/yugastore-java/checkout-microservice/target/classes
+[INFO]
+[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ checkout-microservice ---
+[INFO] Using 'UTF-8' encoding to copy filtered resources.
+[INFO] skip non existing resourceDirectory /Users/nchandrappa/Documents/2019/yb/yugastore-java/checkout-microservice/src/test/resources
+[INFO]
+[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ checkout-microservice ---
+[INFO] Nothing to compile - all classes are up to date
+[INFO]
+[INFO] <<< spring-boot-maven-plugin:2.1.4.RELEASE:run (default-cli) < test-compile @ checkout-microservice <<<
+[INFO]
+[INFO]
+[INFO] --- spring-boot-maven-plugin:2.1.4.RELEASE:run (default-cli) @ checkout-microservice ---
+2019-09-16 11:59:07.834 INFO 28340 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$833b521d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+
+ . ____ _ __ _ _
+ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
+( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
+ \\/ ___)| |_)| | | | | || (_| | ) ) ) )
+ ' |____| .__|_| |_|_| |_\__, | / / / /
+ =========|_|==============|___/=/_/_/_/
+ :: Spring Boot :: (v2.1.4.RELEASE)
+
+2019-09-16 11:59:07.933 INFO 28340 --- [ main] c.y.a.y.c.CheckoutService : The following profiles are active: local
+2019-09-16 11:59:08.230 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-09-16 11:59:08.238 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 5ms. Found 0 repository interfaces.
+2019-09-16 11:59:08.336 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-09-16 11:59:08.373 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 37ms. Found 0 repository interfaces.
+2019-09-16 11:59:08.375 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
+2019-09-16 11:59:08.393 INFO 28340 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 17ms. Found 2 repository interfaces.
+2019-09-16 11:59:08.652 INFO 28340 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=f9d3ee05-724f-3913-8a55-2e18ac6bbef3
+2019-09-16 11:59:08.671 INFO 28340 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.yugabyte.app.yugastore.cronoscheckoutapi.rest.clients.ProductCatalogRestClient' of type [org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-09-16 11:59:08.672 INFO 28340 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'com.yugabyte.app.yugastore.cronoscheckoutapi.rest.clients.ShoppingCartRestClient' of type [org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-09-16 11:59:08.737 INFO 28340 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$e6a19c52] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-09-16 11:59:08.746 INFO 28340 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$833b521d] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
+2019-09-16 11:59:09.031 INFO 28340 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8086 (http)
+2019-09-16 11:59:09.055 INFO 28340 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
+2019-09-16 11:59:09.055 INFO 28340 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.17]
+2019-09-16 11:59:09.338 INFO 28340 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
+2019-09-16 11:59:09.338 INFO 28340 --- [ main] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1392 ms
+2019-09-16 11:59:09.675 INFO 28340 --- [ main] c.d.driver.core.GuavaCompatibility : Detected Guava >= 19 in the classpath, using modern compatibility layer
+2019-09-16 11:59:09.831 INFO 28340 --- [ main] com.datastax.driver.core.ClockFactory : Using native clock to generate timestamps.
+2019-09-16 11:59:09.997 INFO 28340 --- [ main] com.datastax.driver.core.NettyUtil : Did not find Netty's native epoll transport in the classpath, defaulting to NIO.
+2019-09-16 11:59:10.072 WARN 28340 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'profileController' defined in URL [jar:file:/Users/nchandrappa/.m2/repository/org/springframework/data/spring-data-rest-webmvc/3.1.6.RELEASE/spring-data-rest-webmvc-3.1.6.RELEASE.jar!/org/springframework/data/rest/webmvc/ProfileController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryRestConfiguration' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+2019-09-16 11:59:10.073 INFO 28340 --- [ main] o.s.b.f.support.DisposableBeanAdapter : Invocation of destroy method failed on bean with name 'cluster': java.lang.NullPointerException
+2019-09-16 11:59:10.074 INFO 28340 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
+2019-09-16 11:59:10.083 INFO 28340 --- [ main] ConditionEvaluationReportLoggingListener :
+
+Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
+2019-09-16 11:59:10.090 ERROR 28340 --- [ main] o.s.boot.SpringApplication : Application run failed
+
+org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'profileController' defined in URL [jar:file:/Users/nchandrappa/.m2/repository/org/springframework/data/spring-data-rest-webmvc/3.1.6.RELEASE/spring-data-rest-webmvc-3.1.6.RELEASE.jar!/org/springframework/data/rest/webmvc/ProfileController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryRestConfiguration' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1341) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1187) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main(CheckoutService.java:14) [classes/:na]
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
+ at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:558) [spring-boot-maven-plugin-2.1.4.RELEASE.jar:2.1.4.RELEASE]
+ at java.lang.Thread.run(Thread.java:748) [na:1.8.0_181]
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryRestConfiguration' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 25 common frames omitted
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 39 common frames omitted
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:394) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:366) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration(RepositoryRestMvcConfiguration.java:310) ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
+ at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 40 common frames omitted
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 63 common frames omitted
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:378) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1681) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1433) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1111) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory(Repositories.java:97) ~[spring-data-commons-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation(Repositories.java:90) ~[spring-data-commons-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.repository.support.Repositories.(Repositories.java:83) ~[spring-data-commons-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories(RepositoryRestMvcConfiguration.java:242) ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories() ~[spring-data-rest-webmvc-3.1.6.RELEASE.jar:3.1.6.RELEASE]
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
+ at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 64 common frames omitted
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:367) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 88 common frames omitted
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 98 common frames omitted
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference(ConfigurationClassEnhancer.java:394) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:366) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory() ~[classes/:na]
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate(AbstractCassandraConfiguration.java:199) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14() ~[classes/:na]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke() ~[classes/:na]
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate() ~[classes/:na]
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
+ at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 99 common frames omitted
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 122 common frames omitted
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1778) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:339) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.session() ~[classes/:na]
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.getRequiredSession(AbstractCassandraConfiguration.java:66) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.sessionFactory(AbstractCassandraConfiguration.java:112) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$sessionFactory$7() ~[classes/:na]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke() ~[classes/:na]
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory() ~[classes/:na]
+ at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
+ at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
+ at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 123 common frames omitted
+Caused by: com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:39) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.Cluster.connect(Cluster.java:283) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect(CassandraCqlSessionFactoryBean.java:89) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet(CassandraCqlSessionFactoryBean.java:82) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet(CassandraSessionFactoryBean.java:59) ~[spring-data-cassandra-2.1.6.RELEASE.jar:2.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774) ~[spring-beans-5.1.6.RELEASE.jar:5.1.6.RELEASE]
+ ... 143 common frames omitted
+Caused by: java.lang.NullPointerException: null
+ at com.datastax.driver.core.RequestHandler.(RequestHandler.java:91) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.SessionManager.executeAsync(SessionManager.java:132) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.AbstractSession.executeAsync(AbstractSession.java:76) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.Cluster$1.apply(Cluster.java:341) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.Cluster$1.apply(Cluster.java:338) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1442) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform(Futures.java:1433) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run(Futures.java:1408) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:456) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.AbstractFuture.executeListener(AbstractFuture.java:817) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.AbstractFuture.addListener(AbstractFuture.java:595) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener(AbstractFuture.java:96) ~[guava-19.0.jar:na]
+ at com.google.common.util.concurrent.Futures.transformAsync(Futures.java:1108) ~[guava-19.0.jar:na]
+ at com.datastax.driver.core.GuavaCompatibility$Version19OrHigher.transformAsync(GuavaCompatibility.java:205) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:338) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ at com.datastax.driver.core.Cluster.connect(Cluster.java:281) ~[cassandra-driver-core-3.2.0-yb-18.jar:na]
+ ... 148 common frames omitted
+
+[WARNING]
+java.lang.reflect.InvocationTargetException
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'profileController' defined in URL [jar:file:/Users/nchandrappa/.m2/repository/org/springframework/data/spring-data-rest-webmvc/3.1.6.RELEASE/spring-data-rest-webmvc-3.1.6.RELEASE.jar!/org/springframework/data/rest/webmvc/ProfileController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryRestConfiguration' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:769)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositoryRestConfiguration' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:627)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.rest.core.config.RepositoryRestConfiguration]: Factory method 'repositoryRestConfiguration' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:185)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'repositories' defined in class path resource [org/springframework/data/rest/webmvc/config/RepositoryRestMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:627)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.repository.support.Repositories]: Factory method 'repositories' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:185)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'productInventoryRepository': Cannot resolve reference to bean 'cassandraTemplate' while setting bean property 'cassandraTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:378)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:627)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminTemplate]: Factory method 'cassandraTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:185)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:627)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate (AbstractCassandraConfiguration.java:199)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.SessionFactory]: Factory method 'sessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:185)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate (AbstractCassandraConfiguration.java:199)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'session' defined in class path resource [com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig$CassandraConfig.class]: Invocation of init method failed; nested exception is com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1778)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:593)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:339)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.session ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.getRequiredSession (AbstractCassandraConfiguration.java:66)
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.sessionFactory (AbstractCassandraConfiguration.java:112)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$sessionFactory$7 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate (AbstractCassandraConfiguration.java:199)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: com.datastax.driver.core.exceptions.DriverInternalError: Unexpected exception thrown
+ at com.datastax.driver.core.DriverThrowables.propagateCause (DriverThrowables.java:39)
+ at com.datastax.driver.core.Cluster.connect (Cluster.java:283)
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect (CassandraCqlSessionFactoryBean.java:89)
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet (CassandraCqlSessionFactoryBean.java:82)
+ at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet (CassandraSessionFactoryBean.java:59)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods (AbstractAutowireCapableBeanFactory.java:1837)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1774)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:593)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:339)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.session ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.getRequiredSession (AbstractCassandraConfiguration.java:66)
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.sessionFactory (AbstractCassandraConfiguration.java:112)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$sessionFactory$7 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate (AbstractCassandraConfiguration.java:199)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
+Caused by: java.lang.NullPointerException
+ at com.datastax.driver.core.RequestHandler. (RequestHandler.java:91)
+ at com.datastax.driver.core.SessionManager.executeAsync (SessionManager.java:132)
+ at com.datastax.driver.core.AbstractSession.executeAsync (AbstractSession.java:76)
+ at com.datastax.driver.core.Cluster$1.apply (Cluster.java:341)
+ at com.datastax.driver.core.Cluster$1.apply (Cluster.java:338)
+ at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform (Futures.java:1442)
+ at com.google.common.util.concurrent.Futures$AsyncChainingFuture.doTransform (Futures.java:1433)
+ at com.google.common.util.concurrent.Futures$AbstractChainingFuture.run (Futures.java:1408)
+ at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute (MoreExecutors.java:456)
+ at com.google.common.util.concurrent.AbstractFuture.executeListener (AbstractFuture.java:817)
+ at com.google.common.util.concurrent.AbstractFuture.addListener (AbstractFuture.java:595)
+ at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.addListener (AbstractFuture.java:96)
+ at com.google.common.util.concurrent.Futures.transformAsync (Futures.java:1108)
+ at com.datastax.driver.core.GuavaCompatibility$Version19OrHigher.transformAsync (GuavaCompatibility.java:205)
+ at com.datastax.driver.core.Cluster.connectAsync (Cluster.java:338)
+ at com.datastax.driver.core.Cluster.connect (Cluster.java:281)
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect (CassandraCqlSessionFactoryBean.java:89)
+ at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet (CassandraCqlSessionFactoryBean.java:82)
+ at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet (CassandraSessionFactoryBean.java:59)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods (AbstractAutowireCapableBeanFactory.java:1837)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAutowireCapableBeanFactory.java:1774)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:593)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:339)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.session ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.getRequiredSession (AbstractCassandraConfiguration.java:66)
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.sessionFactory (AbstractCassandraConfiguration.java:112)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$sessionFactory$7 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.sessionFactory ()
+ at org.springframework.data.cassandra.config.AbstractCassandraConfiguration.cassandraTemplate (AbstractCassandraConfiguration.java:199)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.CGLIB$cassandraTemplate$14 ()
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d$$FastClassBySpringCGLIB$$448d3b42.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.config.YugabyteLocalConfig$CassandraConfig$$EnhancerBySpringCGLIB$$3663ed2d.cassandraTemplate ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:607)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference (BeanDefinitionValueResolver.java:367)
+ at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary (BeanDefinitionValueResolver.java:110)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues (AbstractAutowireCapableBeanFactory.java:1681)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean (AbstractAutowireCapableBeanFactory.java:1433)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:592)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:204)
+ at org.springframework.context.support.AbstractApplicationContext.getBean (AbstractApplicationContext.java:1111)
+ at org.springframework.data.repository.support.Repositories.cacheRepositoryFactory (Repositories.java:97)
+ at org.springframework.data.repository.support.Repositories.populateRepositoryFactoryInformation (Repositories.java:90)
+ at org.springframework.data.repository.support.Repositories. (Repositories.java:83)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositories (RepositoryRestMvcConfiguration.java:242)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositories$0 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.resolveBeanReference (ConfigurationClassEnhancer.java:394)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:366)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositories ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration.repositoryRestConfiguration (RepositoryRestMvcConfiguration.java:310)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.CGLIB$repositoryRestConfiguration$11 ()
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0$$FastClassBySpringCGLIB$$575e409b.invoke ()
+ at org.springframework.cglib.proxy.MethodProxy.invokeSuper (MethodProxy.java:244)
+ at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept (ConfigurationClassEnhancer.java:363)
+ at org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration$$EnhancerBySpringCGLIB$$88246dc0.repositoryRestConfiguration ()
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate (SimpleInstantiationStrategy.java:154)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiate (ConstructorResolver.java:622)
+ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod (ConstructorResolver.java:456)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod (AbstractAutowireCapableBeanFactory.java:1321)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1160)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate (DependencyDescriptor.java:277)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency (DefaultListableBeanFactory.java:1247)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency (DefaultListableBeanFactory.java:1167)
+ at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument (ConstructorResolver.java:857)
+ at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray (ConstructorResolver.java:760)
+ at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor (ConstructorResolver.java:218)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor (AbstractAutowireCapableBeanFactory.java:1341)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance (AbstractAutowireCapableBeanFactory.java:1187)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java:555)
+ at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:515)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0 (AbstractBeanFactory.java:320)
+ at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (DefaultSingletonBeanRegistry.java:222)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (AbstractBeanFactory.java:318)
+ at org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:199)
+ at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons (DefaultListableBeanFactory.java:849)
+ at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization (AbstractApplicationContext.java:877)
+ at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:549)
+ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh (ServletWebServerApplicationContext.java:142)
+ at org.springframework.boot.SpringApplication.refresh (SpringApplication.java:775)
+ at org.springframework.boot.SpringApplication.refreshContext (SpringApplication.java:397)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:316)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1260)
+ at org.springframework.boot.SpringApplication.run (SpringApplication.java:1248)
+ at com.yugabyte.app.yugastore.cronoscheckoutapi.CheckoutService.main (CheckoutService.java:14)
+ at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
+ at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
+ at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
+ at java.lang.reflect.Method.invoke (Method.java:498)
+ at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run (AbstractRunMojo.java:558)
+ at java.lang.Thread.run (Thread.java:748)
diff --git a/checkout-microservice/pom.xml b/checkout-microservice/pom.xml
index c48b386..43a8781 100644
--- a/checkout-microservice/pom.xml
+++ b/checkout-microservice/pom.xml
@@ -5,7 +5,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.0.4.RELEASE
+ 2.2.2.RELEASE
com.yugabyte.app.yugastore
@@ -18,8 +18,8 @@
UTF-8
UTF-8
1.8
- Finchley.RELEASE
- 2.0.0.RELEASE
+ Hoxton.RELEASE
+ 3.1.0.RELEASE
@@ -70,30 +70,58 @@
spring-boot-starter-test
test
-
+
+
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-starter-kubernetes
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-ribbon
+
+
+ org.springframework.cloud
+ spring-cloud-starter-kubernetes-ribbon
+
+
org.springframework.cloud
- spring-cloud-starter-feign
- 1.4.6.RELEASE
+ spring-cloud-starter-openfeign
+
+ org.springframework.cloud
+ spring-cloud-openfeign-core
+
+
+ io.dekorate
+ kubernetes-spring-starter
+ 0.7.2
+
+
+ org.springframework.cloud
+ spring-cloud-starter-netflix-eureka-client
+
+
org.springframework.boot
spring-boot-starter-actuator
diff --git a/checkout-microservice/pom.xml.bckp b/checkout-microservice/pom.xml.bckp
new file mode 100644
index 0000000..c48b386
--- /dev/null
+++ b/checkout-microservice/pom.xml.bckp
@@ -0,0 +1,159 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.4.RELEASE
+
+
+ com.yugabyte.app.yugastore
+ checkout-microservice
+ 0.0.1-SNAPSHOT
+ checkout-microservice
+ The microservice that powers checkout of products by users in YugaStore
+
+
+ UTF-8
+ UTF-8
+ 1.8
+ Finchley.RELEASE
+ 2.0.0.RELEASE
+
+
+
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-dependencies
+ ${spring-cloud-services.version}
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-cassandra
+
+
+ com.datastax.cassandra
+ cassandra-driver-core
+
+
+
+
+ com.yugabyte
+ cassandra-driver-core
+ 3.2.0-yb-18
+
+
+ org.springframework.boot
+ spring-boot-starter-data-rest
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-dependencies
+ 2.1.2.RELEASE
+ pom
+ import
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ Greenwich.RELEASE
+ pom
+ import
+
+
+ io.pivotal.spring.cloud
+ spring-cloud-services-starter-service-registry
+ 2.1.2.RELEASE
+
+
+ org.springframework.cloud
+ spring-cloud-starter-feign
+ 1.4.6.RELEASE
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+
+ repository.spring.release
+ Spring GA Repository
+ http://repo.spring.io/release
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+
+
+
+ spring-snapshots
+ Spring Snapshots
+ https://repo.spring.io/snapshot
+
+ true
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/milestone
+
+ false
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
diff --git a/checkout-microservice/services.yml b/checkout-microservice/services.yml
new file mode 100644
index 0000000..77e6a37
--- /dev/null
+++ b/checkout-microservice/services.yml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: checkout-microservice-lb
+spec:
+ type: LoadBalancer
+ selector:
+ app: checkout
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
\ No newline at end of file
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/FeignConfiguration.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/FeignConfiguration.java
new file mode 100644
index 0000000..2883784
--- /dev/null
+++ b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/FeignConfiguration.java
@@ -0,0 +1,11 @@
+package com.yugabyte.app.yugastore.cronoscheckoutapi.config;
+
+import org.springframework.cloud.openfeign.FeignClientsConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Import(FeignClientsConfiguration.class)
+@Configuration
+public class FeignConfiguration {
+
+}
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteAppProperties.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteAppProperties.java
deleted file mode 100644
index b3d002b..0000000
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteAppProperties.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package com.yugabyte.app.yugastore.cronoscheckoutapi.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.stereotype.Component;
-
-@RefreshScope
-@Component
-public class YugabyteAppProperties {
-
- @Value("${cronos.yugabyte.keyspace}")
- String keyspace;
-
- public String getKeyspace() {
- return keyspace;
- }
-
-}
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteCloudConfig.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteCloudConfig.java
deleted file mode 100644
index 7f058e4..0000000
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteCloudConfig.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package com.yugabyte.app.yugastore.cronoscheckoutapi.config;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;
-import org.springframework.data.cassandra.config.SchemaAction;
-import org.springframework.data.cassandra.core.CassandraTemplate;
-import org.springframework.data.cassandra.repository.config.EnableCassandraRepositories;
-
-import com.datastax.driver.core.AuthProvider;
-import com.datastax.driver.core.HostDistance;
-import com.datastax.driver.core.PlainTextAuthProvider;
-import com.datastax.driver.core.PoolingOptions;
-import com.datastax.driver.core.Session;
-
-@Configuration
-@EnableAutoConfiguration
-@Profile(value = "cloud")
-class CassandraCloudConfig {
-
- @Configuration
- @EnableCassandraRepositories(basePackages = { "com.yugabyte.app.yugastore.repo" })
- class CassandraConfig extends AbstractCassandraConfiguration {
-
- @Autowired
- YugabyteAppProperties properties;
-
- @Value("${cronos.yugabyte.hostname}")
- private String cassandraHost;
-
- @Value("${cronos.yugabyte.port:9042}")
- private int cassandraPort;
-
- @Value("${cronos.yugabyte.username:cassandra}")
- private String cassandraUsername;
-
-
- @Value("${cronos.yugabyte.password:cassandra}")
- private String cassandraPassword;
-
-
- @Override
- public String getKeyspaceName() {
- return properties.getKeyspace();
- }
-
- @Override
- public String getContactPoints() {
- return cassandraHost;
-
- }
-
- @Override
- public int getPort() {
- return cassandraPort;
- }
-
- @Override
- protected AuthProvider getAuthProvider() {
- return new PlainTextAuthProvider(cassandraUsername, cassandraPassword);
- }
-//
-// @Bean
-// public CassandraCqlClusterFactoryBean cluster() {
-//
-// CassandraCqlClusterFactoryBean cluster = new CassandraCqlClusterFactoryBean();
-// cluster.setContactPoints(cassandraHost);
-// cluster.setPoolingOptions(getPoolingOptions());
-//
-// return cluster;
-// }
-//
- @Override
- public PoolingOptions getPoolingOptions() {
-
- PoolingOptions poolingOptions = new PoolingOptions()
- .setMaxRequestsPerConnection(HostDistance.LOCAL, 32768)
- .setMaxRequestsPerConnection(HostDistance.REMOTE, 2000);
-
- return poolingOptions;
- }
-
- @Override
- public SchemaAction getSchemaAction() {
- return SchemaAction.CREATE_IF_NOT_EXISTS;
- }
-
- @Bean
- public CassandraTemplate cassandraTemplate(Session session) {
- return new CassandraTemplate(session);
- }
-
- }
-}
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig.java
deleted file mode 100644
index 3f2392e..0000000
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteLocalConfig.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.yugabyte.app.yugastore.cronoscheckoutapi.config;
-
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;
-import org.springframework.data.cassandra.config.SchemaAction;
-import org.springframework.data.cassandra.core.CassandraTemplate;
-import org.springframework.data.cassandra.repository.config.EnableCassandraRepositories;
-
-import com.datastax.driver.core.Session;
-
-@Configuration
-@EnableAutoConfiguration
-@Profile(value = "local")
-class YugabyteLocalConfig {
-
- @Configuration
- @EnableCassandraRepositories(basePackages = { "com.yugabyte.app.yugastore.repo" })
- class CassandraConfig extends AbstractCassandraConfiguration {
-
- @Value("${cronos.yugabyte.hostname:localhost}")
- private String cassandraHost;
-
- @Value("${cronos.yugabyte.port:9042}")
- private int cassandraPort;
-
- @Value("${cronos.yugabyte.keyspace:cronos}")
- private String keyspace;
-
- @Override
- public String getKeyspaceName() {
- return keyspace;
- }
-
- @Override
- public String getContactPoints() {
- return cassandraHost;
- }
-
- @Override
- public int getPort() {
- return cassandraPort;
- }
-
- @Override
- public SchemaAction getSchemaAction() {
- return SchemaAction.CREATE_IF_NOT_EXISTS;
- }
-
- @Bean
- public CassandraTemplate cassandraTemplate(Session session) {
- return new CassandraTemplate(session);
- }
-
- }
-}
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteYCQLConfig.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteYCQLConfig.java
new file mode 100644
index 0000000..0848814
--- /dev/null
+++ b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/config/YugabyteYCQLConfig.java
@@ -0,0 +1,5 @@
+package com.yugabyte.app.yugastore.cronoscheckoutapi.config;
+
+public class YugabyteYCQLConfig {
+
+}
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ProductCatalogRestClient.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ProductCatalogRestClient.java
index d87bdbd..e613528 100644
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ProductCatalogRestClient.java
+++ b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ProductCatalogRestClient.java
@@ -2,7 +2,6 @@
import java.util.List;
-import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -10,7 +9,7 @@
import com.yugabyte.app.yugastore.cronoscheckoutapi.domain.ProductMetadata;
import com.yugabyte.app.yugastore.cronoscheckoutapi.domain.ProductRanking;
-@FeignClient("products-microservice")
+
@RequestMapping("/products-microservice")
public interface ProductCatalogRestClient {
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ShoppingCartRestClient.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ShoppingCartRestClient.java
index 047801d..e8dbe3b 100644
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ShoppingCartRestClient.java
+++ b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/rest/clients/ShoppingCartRestClient.java
@@ -2,11 +2,9 @@
import java.util.Map;
-import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
-@FeignClient("cart-microservice")
@RequestMapping("/cart-microservice")
public interface ShoppingCartRestClient {
diff --git a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/service/CheckoutServiceImpl.java b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/service/CheckoutServiceImpl.java
index b03e962..0bdcdc3 100644
--- a/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/service/CheckoutServiceImpl.java
+++ b/checkout-microservice/src/main/java/com/yugabyte/app/yugastore/cronoscheckoutapi/service/CheckoutServiceImpl.java
@@ -20,6 +20,12 @@
import com.yugabyte.app.yugastore.cronoscheckoutapi.rest.clients.ProductCatalogRestClient;
import com.yugabyte.app.yugastore.cronoscheckoutapi.rest.clients.ShoppingCartRestClient;
+import feign.Client;
+import feign.Contract;
+import feign.Feign;
+import feign.codec.Decoder;
+import feign.codec.Encoder;
+
@Service
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
@@ -32,14 +38,33 @@ public class CheckoutServiceImpl {
ProductInventory productInventory;
ProductMetadata productDetails;
-
- @Autowired
- public CheckoutServiceImpl(ProductInventoryRepository productInventoryRepository,
- ShoppingCartRestClient shoppingCartRestClient, ProductCatalogRestClient productCatalogRestClient) {
- this.productInventoryRepository = productInventoryRepository;
- this.shoppingCartRestClient = shoppingCartRestClient;
- this.productCatalogRestClient = productCatalogRestClient;
- }
+
+ @Autowired
+ public CheckoutServiceImpl (ProductInventoryRepository productInventoryRepository,
+ Decoder decoder, Encoder encoder, Client client,
+ Contract contract) {
+ this.productInventoryRepository = productInventoryRepository;
+ this.shoppingCartRestClient = Feign.builder().client(client)
+ .encoder(encoder)
+ .decoder(decoder)
+ .contract(contract)
+ .target(ShoppingCartRestClient.class,
+ "http://cart-microservice");
+ this.productCatalogRestClient = Feign.builder().client(client)
+ .encoder(encoder)
+ .decoder(decoder)
+ .contract(contract)
+ .target(ProductCatalogRestClient.class,
+ "http://products-microservice");
+ }
+
+// @Autowired
+// public CheckoutServiceImpl(ProductInventoryRepository productInventoryRepository,
+// ShoppingCartRestClient shoppingCartRestClient, ProductCatalogRestClient productCatalogRestClient) {
+// this.productInventoryRepository = productInventoryRepository;
+// this.shoppingCartRestClient = shoppingCartRestClient;
+// this.productCatalogRestClient = productCatalogRestClient;
+// }
@Autowired
private CassandraOperations cassandraTemplate;
diff --git a/checkout-microservice/src/main/resources/application.properties b/checkout-microservice/src/main/resources/application.properties
index b1cb85d..a828fbd 100644
--- a/checkout-microservice/src/main/resources/application.properties
+++ b/checkout-microservice/src/main/resources/application.properties
@@ -1,5 +1,9 @@
-cronos.yugabyte.keyspace=cronos
-cronos.yugabyte.hostname=127.0.0.1
-cronos.yugabyte.port=9042
-spring.profiles.active=local
-server.port=8086
+#cronos.yugabyte.keyspace=cronos
+#cronos.yugabyte.hostname=10.100.200.225
+#cronos.yugabyte.hostname=127.0.0.1
+#cronos.yugabyte.port=9042
+
+spring.data.cassandra.keyspace-name=cronos
+spring.data.cassandra.contact-points=127.0.0.1
+spring.data.cassandra.port=9042
+
diff --git a/checkout-microservice/src/main/resources/application.yml b/checkout-microservice/src/main/resources/application.yml
new file mode 100644
index 0000000..25f44cc
--- /dev/null
+++ b/checkout-microservice/src/main/resources/application.yml
@@ -0,0 +1,21 @@
+spring:
+ application:
+ name: checkout-microservice
+ cloud:
+ kubernetes:
+ enabled: true
+ reload:
+ enabled: true
+ gateway:
+ discovery:
+ locator:
+ lowerCaseServiceId: true
+ enabled: true
+eureka:
+ client:
+ enabled: false
+dekorate:
+ kubernetes:
+ serviceType: NodePort
+ imagePullPolicy: Always
+ group: nchandrappa
\ No newline at end of file
diff --git a/checkout-microservice/src/main/resources/bootstrap.yaml b/checkout-microservice/src/main/resources/bootstrap.yaml
deleted file mode 100644
index 1c0bd93..0000000
--- a/checkout-microservice/src/main/resources/bootstrap.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
-spring:
- application:
- name: checkout-microservice
-server:
- port: 8083
-eureka:
- client:
- serviceUrl:
- defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
diff --git a/checkout-microservice/src/main/resources/bootstrap.yaml.bkup b/checkout-microservice/src/main/resources/bootstrap.yaml.bkup
new file mode 100644
index 0000000..49ac4f2
--- /dev/null
+++ b/checkout-microservice/src/main/resources/bootstrap.yaml.bkup
@@ -0,0 +1,9 @@
+spring:
+ application:
+ name: checkout-microservice
+#server:
+# port: 8083
+#eureka:
+# client:
+# serviceUrl:
+# defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
diff --git a/k8s-deployments/Yugabyte/yugabyte-statefulset-rf-1.yaml b/k8s-deployments/Yugabyte/yugabyte-statefulset-rf-1.yaml
new file mode 100644
index 0000000..541f391
--- /dev/null
+++ b/k8s-deployments/Yugabyte/yugabyte-statefulset-rf-1.yaml
@@ -0,0 +1,292 @@
+#
+# Overall Design:
+# There are two Kubernetes StatefulSets in this yaml file - yb-master and yb-tserver. Each of
+# these has the following:
+# - a headless service to expose a DNS entry for discovery
+# - a service to expose end-points to the outside world
+# - the stateful set itself
+# - a load-balancer service to view the universe dashboard UI
+#
+# Using YB with k8s
+# - Create cluster : kubectl apply -f yugabyte-statefulset.yaml
+# - List the pods : kubectl get pods
+# - Run cqlsh : kubectl exec -it yb-tserver-0 /home/yugabyte/bin/cqlsh
+# - Run Redis cli : kubectl exec -it yb-tserver-0 /home/yugabyte/bin/redis-cli
+# - Run psql : kubectl exec -it yb-tserver-0 /home/yugabyte/bin/ysqlsh --
+# -U postgres -d postgres -h yb-tserver-0 -p 5433
+# - Connect to the ui : kubectl port-forward yb-master-0 7000
+# You can now view the UI at http://localhost:7000
+# - Destroy cluster : kubectl delete -f yugabyte-statefulset.yaml
+# - Delete PVCs : kubectl delete pvc -l app=yb-tserver && kubectl delete pvc -l app=yb-master
+
+apiVersion: v1
+kind: Service
+metadata:
+ # This is a "headless" service for the yb-master which exists to allow discovery of the set of
+ # member pods (masters). The CNAME of this service points to SRV records - one for each Pod that
+ # is Running and Ready). Read more in the Kubernetes docs:
+ # https://kubernetes.io/docs/tutorials/stateful-application/basic-stateful-set/
+ name: yb-masters
+ labels:
+ app: yb-master
+spec:
+ clusterIP: None
+ ports:
+ - name: ui
+ port: 7000
+ - name: rpc-port
+ port: 7100
+ selector:
+ app: yb-master
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: yb-master-ui
+ labels:
+ app: yb-master
+spec:
+ ports:
+ - name: ui
+ port: 7000
+ selector:
+ app: yb-master
+ type: LoadBalancer
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: yb-master
+ labels:
+ app: yb-master
+spec:
+ serviceName: yb-masters
+ podManagementPolicy: "Parallel"
+ replicas: 1
+ selector:
+ matchLabels:
+ app: yb-master
+ template:
+ metadata:
+ labels:
+ app: yb-master
+ spec:
+ affinity:
+ # Set the anti-affinity selector scope to YB masters.
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - weight: 100
+ podAffinityTerm:
+ labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - yb-master
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: yb-master
+ image: yugabytedb/yugabyte:latest
+ imagePullPolicy: Always
+ env:
+ - name: GET_HOSTS_FROM
+ value: dns
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ command:
+ - "/home/yugabyte/bin/yb-master"
+ - "--fs_data_dirs=/mnt/data0"
+ - "--rpc_bind_addresses=$(POD_NAME).yb-masters.$(NAMESPACE).svc.cluster.local:7100"
+ - "--server_broadcast_addresses=$(POD_NAME).yb-masters.$(NAMESPACE).svc.cluster.local:7100"
+ - "--use_private_ip=never"
+ - "--master_addresses=yb-master-0.yb-masters.$(NAMESPACE).svc.cluster.local:7100"
+ # To disable YugaByte SQL API functionality, set the
+ # "enable_ysql" flag to false. Flag supported after 2.0.
+ - "--enable_ysql=true"
+ - "--replication_factor=1"
+ - "--logtostderr"
+ ports:
+ - containerPort: 7000
+ name: master-ui
+ - containerPort: 7100
+ name: master-rpc
+# readinessProbe:
+# tcpSocket:
+# port: 7100
+# initialDelaySeconds: 5
+# periodSeconds: 10
+# livenessProbe:
+# tcpSocket:
+# port: 7100
+# initialDelaySeconds: 15
+# periodSeconds: 10
+
+ # These volume mounts are persistent. They are like inline claims,
+ # but not exactly because the names need to match exactly one of
+ # the stateful pod volumes.
+ volumeMounts:
+ - name: datadir
+ mountPath: /mnt/data0
+ updateStrategy:
+ type: RollingUpdate
+ # These are converted to volume claims by the controller
+ # and mounted at the paths mentioned above.
+ # do not use these in production until ssd GCEPersistentDisk or other ssd pd
+ volumeClaimTemplates:
+ - metadata:
+ name: datadir
+ spec:
+ accessModes: [ "ReadWriteOnce" ]
+ resources:
+ requests:
+ storage: 10Gi
+ storageClassName: standard
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ # This is a "headless" service for the yb-tserver which exists to allow discovery of the set of
+ # member pods (tservers).
+ name: yb-tservers
+ labels:
+ app: yb-tserver
+spec:
+ clusterIP: None
+ ports:
+ - name: ui
+ port: 9000
+ - name: rpc-port
+ port: 9100
+ - name: cassandra
+ port: 9042
+ - name: redis
+ port: 6379
+ - name: postgres
+ port: 5433
+ selector:
+ app: yb-tserver
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: yb-db-service
+ labels:
+ app: yb-tserver
+spec:
+ ports:
+ - name: ui
+ port: 9000
+ - name: cassandra
+ port: 9042
+ - name: redis
+ port: 6379
+ - name: postgres
+ port: 5433
+ selector:
+ app: yb-tserver
+ type: LoadBalancer
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: yb-tserver
+ labels:
+ app: yb-tserver
+spec:
+ serviceName: yb-tservers
+ podManagementPolicy: "Parallel"
+ replicas: 1
+ selector:
+ matchLabels:
+ app: yb-tserver
+ template:
+ metadata:
+ labels:
+ app: yb-tserver
+ spec:
+ affinity:
+ # Set the anti-affinity selector scope to YB tservers here.
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - weight: 100
+ podAffinityTerm:
+ labelSelector:
+ matchExpressions:
+ - key: app
+ operator: In
+ values:
+ - yb-tserver
+ topologyKey: kubernetes.io/hostname
+ containers:
+ - name: yb-tserver
+ image: yugabytedb/yugabyte:latest
+ imagePullPolicy: Always
+ env:
+ - name: GET_HOSTS_FROM
+ value: dns
+ - name: POD_IP
+ valueFrom:
+ fieldRef:
+ fieldPath: status.podIP
+ - name: POD_NAME
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.name
+ - name: NAMESPACE
+ valueFrom:
+ fieldRef:
+ fieldPath: metadata.namespace
+ command:
+ - "/home/yugabyte/bin/yb-tserver"
+ - "--fs_data_dirs=/mnt/data0"
+ - "--rpc_bind_addresses=$(POD_NAME).yb-tservers.$(NAMESPACE).svc.cluster.local:9100"
+ - "--server_broadcast_addresses=$(POD_NAME).yb-tservers.$(NAMESPACE).svc.cluster.local:9100"
+ # To disable YugaByte SQL API functionality, set the enable_ysql flag to false
+ # and comment out the pgsql_proxy_bind_address flag
+ - "--enable_ysql=true"
+ - "--pgsql_proxy_bind_address=$(POD_IP):5433"
+ - "--use_private_ip=never"
+ - "--tserver_master_addrs=yb-master-0.yb-masters.$(NAMESPACE).svc.cluster.local:7100"
+ - "--logtostderr"
+ ports:
+ - containerPort: 9000
+ name: tserver-ui
+ - containerPort: 9100
+ name: tserver-rpc
+ - containerPort: 9042
+ name: cassandra
+ - containerPort: 6379
+ name: redis
+ - containerPort: 5433
+ name: postgres
+ # These volume mounts are persistent. They are like inline claims,
+ # but not exactly because the names need to match exactly one of
+ # the stateful pod volumes.
+ volumeMounts:
+ - name: datadir
+ mountPath: /mnt/data0
+ updateStrategy:
+ type: RollingUpdate
+ # These are converted to volume claims by the controller
+ # and mounted at the paths mentioned above.
+ # do not use these in production until ssd GCEPersistentDisk or other ssd pd
+ volumeClaimTemplates:
+ - metadata:
+ name: datadir
+ spec:
+ accessModes: [ "ReadWriteOnce" ]
+ resources:
+ requests:
+ storage: 10Gi
+ storageClassName: standard
diff --git a/k8s-deployments/istio/destination-rule-all-mtls.yaml b/k8s-deployments/istio/destination-rule-all-mtls.yaml
new file mode 100644
index 0000000..e69de29
diff --git a/k8s-deployments/istio/destination-rule-all.yaml b/k8s-deployments/istio/destination-rule-all.yaml
new file mode 100644
index 0000000..000f2af
--- /dev/null
+++ b/k8s-deployments/istio/destination-rule-all.yaml
@@ -0,0 +1,46 @@
+apiVersion: networking.istio.io/v1alpha3
+kind: DestinationRule
+metadata:
+ name: cart-microservice
+spec:
+ host: cart-microservice
+ subsets:
+ - name: v1
+ labels:
+ version: v1
+# - name: v2
+# labels:
+# version: v2
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: DestinationRule
+metadata:
+ name: products-microservice
+spec:
+ host: products-microservice
+ subsets:
+ - name: v1
+ labels:
+ version: v1
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: DestinationRule
+metadata:
+ name: checkout-microservice
+spec:
+ host: checkout-microservice
+ subsets:
+ - name: v1
+ labels:
+ version: v1
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: DestinationRule
+metadata:
+ name: api-gateway
+spec:
+ host: api-gateway
+ subsets:
+ - name: v1
+ labels:
+ version: v1
\ No newline at end of file
diff --git a/k8s-deployments/istio/istio-stackdriver-metrics.yaml b/k8s-deployments/istio/istio-stackdriver-metrics.yaml
new file mode 100644
index 0000000..89a3bb3
--- /dev/null
+++ b/k8s-deployments/istio/istio-stackdriver-metrics.yaml
@@ -0,0 +1,751 @@
+
+# Copyright 2020 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# [START istio_istio_samples_stackdriver_metrics_handler_stackdriver]
+apiVersion: config.istio.io/v1alpha2
+kind: handler
+metadata:
+ labels:
+ app: istio-telemetry
+ name: stackdriver
+ namespace: istio-system
+spec:
+ compiledAdapter: stackdriver
+ params:
+ logInfo:
+ server-accesslog-stackdriver.instance.istio-system:
+ labelNames:
+ - source_uid
+ - source_ip
+ - source_app
+ - source_principal
+ - source_name
+ - source_workload
+ - source_namespace
+ - source_owner
+ - destination_uid
+ - destination_app
+ - destination_ip
+ - destination_service_host
+ - destination_workload
+ - destination_name
+ - destination_namespace
+ - destination_owner
+ - destination_principal
+ - api_name
+ - api_version
+ - api_claims
+ - api_key
+ - request_operation
+ - protocol
+ - method
+ - url
+ - response_code
+ - response_size
+ - request_size
+ - request_id
+ - latency
+ - service_authentication_policy
+ - user_agent
+ - response_timestamp
+ - received_bytes
+ - sent_bytes
+ - referer
+ server-tcp-accesslog-stackdriver.instance.istio-system:
+ labelNames:
+ - connection_id
+ - connection_event
+ - source_uid
+ - source_ip
+ - source_app
+ - source_principal
+ - source_name
+ - source_workload
+ - source_namespace
+ - source_owner
+ - destination_uid
+ - destination_app
+ - destination_ip
+ - destination_service_host
+ - destination_workload
+ - destination_name
+ - destination_namespace
+ - destination_owner
+ - destination_principal
+ - protocol
+ - connction_duration
+ - service_authentication_policy
+ - received_bytes
+ - sent_bytes
+ - total_received_bytes
+ - total_sent_bytes
+ metricInfo:
+ client-received-bytes-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/client/received_bytes_count
+ value: 2
+ client-request-bytes.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/client/request_bytes
+ value: 5
+ client-request-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/client/request_count
+ value: 2
+ client-response-bytes.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/client/response_bytes
+ value: 5
+ client-roundtrip-latencies.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/client/roundtrip_latencies
+ value: 5
+ client-sent-bytes-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/client/sent_bytes_count
+ value: 2
+ server-received-bytes-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/server/received_bytes_count
+ value: 2
+ server-request-bytes.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/server/request_bytes
+ value: 5
+ server-request-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/server/request_count
+ value: 2
+ server-response-bytes.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/server/response_bytes
+ value: 5
+ server-response-latencies.instance.istio-system:
+ buckets:
+ exponentialBuckets:
+ growthFactor: 2
+ numFiniteBuckets: 20
+ scale: 1
+ kind: 3
+ metric_type: istio.io/service/server/response_latencies
+ value: 5
+ server-sent-bytes-count.instance.istio-system:
+ kind: 3
+ metric_type: istio.io/service/server/sent_bytes_count
+ value: 2
+ pushInterval: 10s
+# [END istio_istio_samples_stackdriver_metrics_handler_stackdriver]
+---
+# [START istio_istio_samples_stackdriver_metrics_rule_stackdriver_server]
+apiVersion: config.istio.io/v1alpha2
+kind: rule
+metadata:
+ labels:
+ app: istio-telemetry
+ name: stackdriver-server
+ namespace: istio-system
+spec:
+ actions:
+ - handler: stackdriver
+ instances:
+ - server-request-count
+ - server-request-bytes
+ - server-response-bytes
+ - server-response-latencies
+ match: (context.protocol == "http" || context.protocol == "grpc") && (context.reporter.kind
+ | "inbound" == "inbound")
+# [END istio_istio_samples_stackdriver_metrics_rule_stackdriver_server]
+---
+# [START istio_istio_samples_stackdriver_metrics_rule_stackdriver_client]
+apiVersion: config.istio.io/v1alpha2
+kind: rule
+metadata:
+ labels:
+ app: istio-telemetry
+ name: stackdriver-client
+ namespace: istio-system
+spec:
+ actions:
+ - handler: stackdriver
+ instances:
+ - client-request-count
+ - client-request-bytes
+ - client-response-bytes
+ - client-roundtrip-latencies
+ match: (context.protocol == "http" || context.protocol == "grpc") && (context.reporter.kind
+ | "inbound" == "outbound")
+# [END istio_istio_samples_stackdriver_metrics_rule_stackdriver_client]
+---
+# [START istio_istio_samples_stackdriver_metrics_rule_stackdriver_tcp_server]
+apiVersion: config.istio.io/v1alpha2
+kind: rule
+metadata:
+ labels:
+ app: istio-telemetry
+ name: stackdriver-tcp-server
+ namespace: istio-system
+spec:
+ actions:
+ - handler: stackdriver
+ instances:
+ - server-received-bytes-count
+ - server-sent-bytes-count
+ match: context.protocol == "tcp" && (context.reporter.kind | "inbound" == "inbound")
+# [END istio_istio_samples_stackdriver_metrics_rule_stackdriver_tcp_server]
+---
+# [START istio_istio_samples_stackdriver_metrics_rule_stackdriver_tcp_client]
+apiVersion: config.istio.io/v1alpha2
+kind: rule
+metadata:
+ labels:
+ app: istio-telemetry
+ name: stackdriver-tcp-client
+ namespace: istio-system
+spec:
+ actions:
+ - handler: stackdriver
+ instances:
+ - client-received-bytes-count
+ - client-sent-bytes-count
+ match: context.protocol == "tcp" && (context.reporter.kind | "inbound" == "outbound")
+# [END istio_istio_samples_stackdriver_metrics_rule_stackdriver_tcp_client]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_request_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-request-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: '1'
+# [END istio_istio_samples_stackdriver_metrics_instance_server_request_count]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_request_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-request-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: '1'
+# [END istio_istio_samples_stackdriver_metrics_instance_client_request_count]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_request_bytes]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-request-bytes
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: request.total_size
+# [END istio_istio_samples_stackdriver_metrics_instance_server_request_bytes]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_request_bytes]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-request-bytes
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: request.total_size
+# [END istio_istio_samples_stackdriver_metrics_instance_client_request_bytes]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_response_bytes]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-response-bytes
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: response.total_size
+# [END istio_istio_samples_stackdriver_metrics_instance_server_response_bytes]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_response_bytes]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-response-bytes
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: response.total_size
+# [END istio_istio_samples_stackdriver_metrics_instance_client_response_bytes]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_response_latencies]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-response-latencies
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: response.duration
+# [END istio_istio_samples_stackdriver_metrics_instance_server_response_latencies]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_roundtrip_latencies]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-roundtrip-latencies
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ api_name: api.service | "unknown"
+ api_version: api.version | "unknown"
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_operation: conditional((context.protocol | "unknown") == "grpc", request.path
+ | "unknown", request.method | "unknown")
+ request_protocol: context.protocol | "unknown"
+ response_code: response.code | 0
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: response.duration
+# [END istio_istio_samples_stackdriver_metrics_instance_client_roundtrip_latencies]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_received_bytes_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-received-bytes-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_protocol: context.protocol | "unknown"
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: connection.received.bytes | 0
+# [END istio_istio_samples_stackdriver_metrics_instance_server_received_bytes_count]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_received_bytes_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-received-bytes-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_protocol: context.protocol | "unknown"
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: connection.received.bytes | 0
+# [END istio_istio_samples_stackdriver_metrics_instance_client_received_bytes_count]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_server_sent_bytes_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: server-sent-bytes-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_protocol: context.protocol | "unknown"
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ container_name: conditional((destination.name | "unknown").startsWith("istio-telemetry")
+ || (destination.name | "unknown").startsWith("istio-policy"), "mixer", destination.container.name
+ | "unknown")
+ location: '""'
+ namespace_name: destination.workload.namespace | "unknown"
+ pod_name: destination.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_container"'
+ value: connection.sent.bytes | 0
+# [END istio_istio_samples_stackdriver_metrics_instance_server_sent_bytes_count]
+---
+# [START istio_istio_samples_stackdriver_metrics_instance_client_sent_bytes_count]
+apiVersion: config.istio.io/v1alpha2
+kind: instance
+metadata:
+ labels:
+ app: istio-telemetry
+ name: client-sent-bytes-count
+ namespace: istio-system
+spec:
+ compiledTemplate: metric
+ params:
+ dimensions:
+ destination_owner: destination.owner | "unknown"
+ destination_port: destination.port | 0
+ destination_principal: destination.principal | "unknown"
+ destination_service_name: destination.service.name | "unknown"
+ destination_service_namespace: destination.service.namespace | "unknown"
+ destination_workload_name: destination.workload.name | "unknown"
+ destination_workload_namespace: destination.workload.namespace | "unknown"
+ request_protocol: context.protocol | "unknown"
+ service_authentication_policy: conditional((context.reporter.kind | "inbound")
+ == "outbound", "unknown", conditional(connection.mtls | false, "mutual_tls",
+ "none"))
+ source_owner: source.owner | "unknown"
+ source_principal: source.principal | "unknown"
+ source_workload_name: source.workload.name | "unknown"
+ source_workload_namespace: source.workload.namespace | "unknown"
+ monitoredResourceDimensions:
+ cluster_name: '""'
+ location: '""'
+ namespace_name: source.workload.namespace | "unknown"
+ pod_name: source.name | "unknown"
+ project_id: '""'
+ monitoredResourceType: '"k8s_pod"'
+ value: connection.sent.bytes | 0
+# [END istio_istio_samples_stackdriver_metrics_instance_client_sent_bytes_count]
+---
diff --git a/k8s-deployments/istio/virtual-service-all.yaml b/k8s-deployments/istio/virtual-service-all.yaml
new file mode 100644
index 0000000..7820abd
--- /dev/null
+++ b/k8s-deployments/istio/virtual-service-all.yaml
@@ -0,0 +1,52 @@
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: cart-microservice
+spec:
+ hosts:
+ - cart-microservice
+ http:
+ - route:
+ - destination:
+ host: cart-microservice
+ subset: v1
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: products-microservice
+spec:
+ hosts:
+ - products-microservice
+ http:
+ - route:
+ - destination:
+ host: products-microservice
+ subset: v1
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: checkout-microservice
+spec:
+ hosts:
+ - checkout-microservice
+ http:
+ - route:
+ - destination:
+ host: checkout-microservice
+ subset: v1
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: api-gateway
+spec:
+ hosts:
+ - api-gateway
+ http:
+ - route:
+ - destination:
+ host: api-gateway
+ subset: v1
+---
diff --git a/k8s-deployments/istio/virtual-service-cart-test-v2.yaml b/k8s-deployments/istio/virtual-service-cart-test-v2.yaml
new file mode 100644
index 0000000..42332e7
--- /dev/null
+++ b/k8s-deployments/istio/virtual-service-cart-test-v2.yaml
@@ -0,0 +1,17 @@
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: cart-microservice-test-v2
+spec:
+ hosts:
+ - cart-microservice
+ http:
+ - route:
+ - destination:
+ host: cart-microservice
+ subset: v1
+ weight: 50
+ - destination:
+ host: cart-microservice
+ subset: v2
+ weight: 50
\ No newline at end of file
diff --git a/k8s-deployments/istio/virtual-service-fault-injection-test-v2.yaml b/k8s-deployments/istio/virtual-service-fault-injection-test-v2.yaml
new file mode 100644
index 0000000..3a5c32f
--- /dev/null
+++ b/k8s-deployments/istio/virtual-service-fault-injection-test-v2.yaml
@@ -0,0 +1,16 @@
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: cart-microservice-fault-injection-v2
+spec:
+ hosts:
+ - cart-microservice
+ http:
+ - route:
+ - destination:
+ host: cart-microservice
+ subset: v2
+ fault:
+ abort:
+ httpStatus: 503
+ percent: 100
\ No newline at end of file
diff --git a/k8s-deployments/istio/yugastore-gateway.yaml b/k8s-deployments/istio/yugastore-gateway.yaml
new file mode 100644
index 0000000..139c012
--- /dev/null
+++ b/k8s-deployments/istio/yugastore-gateway.yaml
@@ -0,0 +1,39 @@
+apiVersion: networking.istio.io/v1alpha3
+kind: Gateway
+metadata:
+ name: yugastore-gateway
+spec:
+ selector:
+ istio: ingressgateway # use istio default controller
+ servers:
+ - port:
+ number: 80
+ name: http
+ protocol: HTTP
+ hosts:
+ - "*"
+---
+apiVersion: networking.istio.io/v1alpha3
+kind: VirtualService
+metadata:
+ name: yugastore-retailapp-ui
+spec:
+ hosts:
+ - "*"
+ gateways:
+ - yugastore-gateway
+ http:
+ - match:
+ - uri:
+ prefix: /
+# - uri:
+# prefix: /products
+# - uri:
+# prefix: /cart
+# - uri:
+# prefix: /api/hello
+ route:
+ - destination:
+ host: yugastore-ui
+ port:
+ number: 8080
diff --git a/k8s-deployments/microservices/yugastore-deployment.yaml b/k8s-deployments/microservices/yugastore-deployment.yaml
new file mode 100644
index 0000000..157fabf
--- /dev/null
+++ b/k8s-deployments/microservices/yugastore-deployment.yaml
@@ -0,0 +1,316 @@
+# Copyright 2020 YugabyteDB Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#################################################################################################
+# #
+ # # # # #### ## #### ##### #### ##### ###### # ## # # ##
+ # # # # # # # # # # # # # # # # # # # # # #
+ # # # # # # #### # # # # # ##### ##### # # # # # # #
+ # # # # ### ###### # # # # ##### # # ###### # # ######
+ # # # # # # # # # # # # # # # # # # # # # # #
+ # #### #### # # #### # #### # # ###### #### # # ## # #
+
+#################################################################################################
+# This file defines the services, service accounts, and
+# deployments for Yugastore-java: Retail marketplace microservices project.
+#
+# To apply all the yugastore microservices , their corresponding service accounts, and deployments:
+#
+# kubectl apply -f k8s-deployment/microservices/yugastore.yaml
+#
+# Alternatively, you can deploy any resource separately:
+#
+# kubectl apply -f k8s-deployment/microservices/yugastore.yaml -l service=cart-microservice # cart service
+# kubectl apply -f k8s-deployment/microservices/yugastore.yaml -l app=cart,version=v2 # cart-v2 Deployment
+##################################################################################################
+
+##################################################################################################
+# Cart Microservice
+##################################################################################################
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: cart-microservice-v1-properties
+data:
+ spring.datasource.url: jdbc:postgresql://yb-tservers.yb-demo.svc.cluster.local:5433/postgres
+---
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: cart-microservice-v2-properties
+data:
+ yugabyte.sql.datasource.url: jdbc:postgresql://yb-tservers.yb-demo.svc.cluster.local:5433/postgres
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: cart-microservice
+spec:
+ selector:
+ app: cart
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: cart-microservice-v1
+ labels:
+ app: cart
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: cart
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: cart
+ version: v1
+ spec:
+ containers:
+ - name: cart
+ image: nchandrappa/cart-microservice-v1:latest
+ envFrom:
+ - configMapRef:
+ name: cart-microservice-v1-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: cart-microservice-v2
+ labels:
+ app: cart
+ version: v2
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: cart
+ version: v2
+ template:
+ metadata:
+ labels:
+ app: cart
+ version: v2
+ spec:
+ containers:
+ - name: cart
+ image: nchandrappa/cart-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: cart-microservice-v2-properties
+ ports:
+ - containerPort: 8080
+---
+##################################################################################################
+# products microservice
+##################################################################################################
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: products-microservice-properties
+data:
+ spring.data.cassandra.keyspace-name: cronos
+ spring.data.cassandra.contact-points: yb-tservers.yb-demo.svc.cluster.local
+ spring.data.cassandra.port: "9042"
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: products-microservice
+spec:
+ selector:
+ app: products
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: products-microservice
+ labels:
+ app: products
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: products
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: products
+ version: v1
+ spec:
+ containers:
+ - name: products
+ image: nchandrappa/products-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: products-microservice-properties
+ ports:
+ - containerPort: 8080
+---
+##################################################################################################
+# checkout microservice
+##################################################################################################
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: checkout-microservice-properties
+data:
+ spring.data.cassandra.keyspace-name: cronos
+ spring.data.cassandra.contact-points: yb-tservers.yb-demo.svc.cluster.local
+ spring.data.cassandra.port: "9042"
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: checkout-microservice
+spec:
+ selector:
+ app: checkout
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: checkout-microservice
+ labels:
+ app: checkout
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: checkout
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: checkout
+ version: v1
+ spec:
+ containers:
+ - name: checkout
+ image: nchandrappa/checkout-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: checkout-microservice-properties
+ ports:
+ - containerPort: 8080
+---
+##################################################################################################
+# API Gateway microservice
+##################################################################################################
+apiVersion: v1
+kind: Service
+metadata:
+ name: api-gateway
+spec:
+ selector:
+ app: gateway
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: api-gateway
+ labels:
+ app: gateway
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: gateway
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: gateway
+ version: v1
+ spec:
+ containers:
+ - name: gateway
+ image: nchandrappa/api-gateway:latest
+ ports:
+ - containerPort: 8080
+---
+##################################################################################################
+# Yugastore UI
+##################################################################################################
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: yugastore-ui-properties
+data:
+ cronos.yugabyte.api: http://api-gateway.default.svc.cluster.local:8080/api/v1/
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: yugastore-retailapp-ui
+ labels:
+ app: ui
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: ui
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: ui
+ version: v1
+ spec:
+ containers:
+ - name: sappho-retailapp-ui
+ image: nchandrappa/sappho-retailapp-ui
+ envFrom:
+ - configMapRef:
+ name: yugastore-ui-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: yugastore-ui
+spec:
+ selector:
+ app: ui
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+---
\ No newline at end of file
diff --git a/k8s-deployments/util/cleanEnvironment.sh b/k8s-deployments/util/cleanEnvironment.sh
new file mode 100644
index 0000000..019ab13
--- /dev/null
+++ b/k8s-deployments/util/cleanEnvironment.sh
@@ -0,0 +1,60 @@
+#!/bin/bash
+#
+# Copyright 2020 YugabyteDB Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+
+# only ask if in interactive mode
+if [[ -t 0 && -z ${NAMESPACE} ]];then
+ echo -n "namespace ? [default] "
+ read -r NAMESPACE
+fi
+
+if [[ -z ${NAMESPACE} ]];then
+ NAMESPACE=default
+fi
+
+echo "using NAMESPACE=${NAMESPACE}"
+
+protos=( destinationrules virtualservices gateways )
+for proto in "${protos[@]}"; do
+ for resource in $(kubectl get -n ${NAMESPACE} "$proto" -o name); do
+ kubectl delete -n ${NAMESPACE} "$resource";
+ done
+done
+
+OUTPUT=$(mktemp)
+export OUTPUT
+echo "Application cleanup may take up to one minute"
+kubectl delete -n ${NAMESPACE} -f "$SCRIPTDIR/microservices/yugastore-deployment.yaml" > "${OUTPUT}" 2>&1
+ret=$?
+function cleanup() {
+ rm -f "${OUTPUT}"
+}
+
+trap cleanup EXIT
+
+if [[ ${ret} -eq 0 ]];then
+ cat "${OUTPUT}"
+else
+ # ignore NotFound errors
+ OUT2=$(grep -v NotFound "${OUTPUT}")
+ if [[ -n ${OUT2} ]];then
+ cat "${OUTPUT}"
+ exit ${ret}
+ fi
+fi
+
+echo "Application cleanup successful"
\ No newline at end of file
diff --git a/k8s-deployments/util/default-rbac.yml b/k8s-deployments/util/default-rbac.yml
new file mode 100644
index 0000000..d38bacf
--- /dev/null
+++ b/k8s-deployments/util/default-rbac.yml
@@ -0,0 +1,15 @@
+---
+apiVersion: rbac.authorization.k8s.io/v1beta1
+kind: ClusterRoleBinding
+metadata:
+ name: default-rbac
+subjects:
+ - kind: ServiceAccount
+ # Reference to upper's `metadata.name`
+ name: default
+ # Reference to upper's `metadata.namespace`
+ namespace: default
+roleRef:
+ kind: ClusterRole
+ name: cluster-admin
+ apiGroup: rbac.authorization.k8s.io
diff --git a/k8s-deployoment-instructions.md b/k8s-deployoment-instructions.md
new file mode 100644
index 0000000..b96feef
--- /dev/null
+++ b/k8s-deployoment-instructions.md
@@ -0,0 +1,152 @@
+# Yugastore on Managed Kubernetes
+
+This is an implementation of a sample ecommerce app. This microservices-based retail marketplace or eCommerce app is composed of **microservices written in Spring (Java)**, a **UI based on React**, **YugaByte DB as the distributed SQL database** and **Istio for microservices traffic management**.
+
+
+# Features
+
+* Written fully in Spring
+* Desgined for multi-region and Kubernetes-native deployments
+* Istio for microservices traffic management and Service Discovery
+* Features 6 microservices
+* Sample data has over 6K products in the store
+
+
+# Build and run
+
+## Build Jars with Maven
+To build, simply run the following from the base directory:
+
+```
+$ mvn -DskipTests package
+```
+
+
+## Build a Docker Image with Maven
+
+To get started quickly, you can run Jib without even changing your pom.xml:
+
+```
+$ ./mvnw com.google.cloud.tools:jib-maven-plugin:dockerBuild -Dimage=nchandrappa/cart-microservice
+```
+
+To push to a Docker registry you use the build goal, instead of dockerBuild, i.e.
+
+```
+$ ./mvnw com.google.cloud.tools:jib-maven-plugin:build -Dimage=nchandrappa/cart-microservice
+```
+
+Note: Update docker image id to reflect the docker repository of your choice.
+
+
+## Deploy Istio on kubernetes
+
+Install Istio on your kubernetes cluster using `demo` profile so that monitoring and tracing are enabled by default for microservices. [Istio installation docs] (https://istio.io/docs/setup/install/helm/)
+
+
+## Deploy YugabyteDB cluster on Kubernetes
+
+You can [install YugaByte DB by following these instructions](https://docs.yugabyte.com/latest/quick-start/).
+
+a. Install YugabyteDB on Kubernetes
+
+```
+$ kubectl create -f k8s-deployments/util/default-rbac.yml
+$ kubectl create namespace yb-demo
+$ kubectl create -f k8s-deployments/Yugabyte/yugabyte-statefulset-rf-1.yaml -n yb-demo
+
+```
+
+## Load Sample Data into cluster created in previous step
+
+a. Verify YugabyteDB installation by connecting to postgres terminal using the following command
+
+```
+$ kubectl -n yb-demo exec -it yb-tserver-0 /home/yugabyte/bin/ysqlsh -- -h yb-tserver-0 --echo-queries
+```
+
+b. find the external-ip for YugabyteDB cluster by running the below command
+
+```
+$ kubectl get service yb-db-service -n yb-demo
+```
+
+set the following environment variables from above data. example:
+
+```
+$ export CQLSH_HOST=192.168.64.3
+$ export CQLSH_PORT=9042
+$ export YSQLSH_HOST=192.168.64.3
+$ export YSQLSH_PORT=5433
+```
+
+d. Now create the necessary tables as shown below. Load sample dataset by following the steps here: (resources/README.md)
+
+```
+$ cqlsh -f resources/schema.cql
+```
+
+Next, load some sample data. Follow the data load steps in
+
+```
+$ cd resources/
+$ ./dataload.sh
+```
+
+Create the postgres tables in `resources/schema.sql` for the YSQL tables
+
+```
+$ ysqlsh -h $YSQLSH_HOST -p $YSQLSH_PORT -d postgres -f schema.sql
+```
+
+## Deploy Istio Destination Rules and Virtual Servers
+
+
+```
+kubectl label namespace default istio-injection=enabled
+kubectl apply -f k8s-deployments/istio/destination-rule-all.yaml
+kubectl apply -f k8s-deployments/istio/virtual-service-all.yaml
+```
+
+
+## Deploy Yugastore Microservices on Kubernetes
+
+Make sure you have built the docker images as described above and you're in the `yugastore-java` base directory. Now do the following steps.
+
+```
+$ kubectl apply -f k8s-deployments/microservices/yugastore-deployment.yaml
+```
+
+## Deploy istio ingress gateway for Yugastore-UI microservice
+
+```
+$ kubectl apply -f k8s-deployments/istio/yugastore-gateway.yaml
+```
+This will expose the Yugastore-UI ingress to internet through Istio edge gateway.
+
+## Find the Istio gateway external-ip address and navigate to Yugastore-UI
+
+```
+$ kubectl get service istio-ingressgateway -n istio-system
+```
+
+# Traffic Management with Istio - Day 2 operations
+
+We have two versions of cart-microservice, one which uses standard postgres jdbc driver and v2 of the same microservice that uses YugabyteDB cluster aware JDBC driver. We are going to use these two microservices to demonstrate set of day 2 tasks that are commonly used in in microservices deployments like, canary testing, A/B testing, chaos testing.. to name a few.
+
+
+## Canary testing of cart microservice
+
+Canary releases are used to reduce the risk of deploying a new version of microservice into production. You start by routing only a few selected users or small percentage of traffic on to newer version of the microservice. In this task, you'll configure a virtualservice to route 95% of traffic to cart-microservice:v1 and 5% of traffic to cart-microservice:v2.
+
+```
+$ kubectl apply -f k8s-deployments/istio/cart-microservice-canary-testing.yaml
+```
+
+## A/B Testing of cart microservice
+
+A/B testing is used to for testing the new features that are going to prod, like its usability, popularity, noticeability etc. In this task, you will configure a virtualservice to route 50% of traffic onto cart-microservice:v1 and other 50% of traffic to cart-microservice:v1
+
+```
+$ kubectl apply -f cart-microservice-ab-testing.yaml
+```
diff --git a/mvnw b/mvnw
new file mode 100755
index 0000000..a16b543
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,310 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..c8d4337
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,182 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+
+FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index ebaaad8..27b2b4a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -12,10 +12,10 @@
YugaStore - a microservices based retail marketplace app
- eureka-server-local
products-microservice
checkout-microservice
cart-microservice
+ cart-microservice-v1
api-gateway-microservice
react-ui
login-microservice
diff --git a/products-microservice/.mvn/wrapper/MavenWrapperDownloader.java b/products-microservice/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000..72308aa
--- /dev/null
+++ b/products-microservice/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,114 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ https://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.nio.channels.Channels;
+import java.nio.channels.ReadableByteChannel;
+import java.util.Properties;
+
+public class MavenWrapperDownloader {
+
+ /**
+ * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
+ */
+ private static final String DEFAULT_DOWNLOAD_URL =
+ "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar";
+
+ /**
+ * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to
+ * use instead of the default one.
+ */
+ private static final String MAVEN_WRAPPER_PROPERTIES_PATH =
+ ".mvn/wrapper/maven-wrapper.properties";
+
+ /**
+ * Path where the maven-wrapper.jar will be saved to.
+ */
+ private static final String MAVEN_WRAPPER_JAR_PATH =
+ ".mvn/wrapper/maven-wrapper.jar";
+
+ /**
+ * Name of the property which should be used to override the default download url for the wrapper.
+ */
+ private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
+
+ public static void main(String args[]) {
+ System.out.println("- Downloader started");
+ File baseDirectory = new File(args[0]);
+ System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath());
+
+ // If the maven-wrapper.properties exists, read it and check if it contains a custom
+ // wrapperUrl parameter.
+ File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH);
+ String url = DEFAULT_DOWNLOAD_URL;
+ if(mavenWrapperPropertyFile.exists()) {
+ FileInputStream mavenWrapperPropertyFileInputStream = null;
+ try {
+ mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile);
+ Properties mavenWrapperProperties = new Properties();
+ mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream);
+ url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url);
+ } catch (IOException e) {
+ System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'");
+ } finally {
+ try {
+ if(mavenWrapperPropertyFileInputStream != null) {
+ mavenWrapperPropertyFileInputStream.close();
+ }
+ } catch (IOException e) {
+ // Ignore ...
+ }
+ }
+ }
+ System.out.println("- Downloading from: : " + url);
+
+ File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH);
+ if(!outputFile.getParentFile().exists()) {
+ if(!outputFile.getParentFile().mkdirs()) {
+ System.out.println(
+ "- ERROR creating output direcrory '" + outputFile.getParentFile().getAbsolutePath() + "'");
+ }
+ }
+ System.out.println("- Downloading to: " + outputFile.getAbsolutePath());
+ try {
+ downloadFileFromURL(url, outputFile);
+ System.out.println("Done");
+ System.exit(0);
+ } catch (Throwable e) {
+ System.out.println("- Error downloading");
+ e.printStackTrace();
+ System.exit(1);
+ }
+ }
+
+ private static void downloadFileFromURL(String urlString, File destination) throws Exception {
+ URL website = new URL(urlString);
+ ReadableByteChannel rbc;
+ rbc = Channels.newChannel(website.openStream());
+ FileOutputStream fos = new FileOutputStream(destination);
+ fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
+ fos.close();
+ rbc.close();
+ }
+
+}
diff --git a/products-microservice/.mvn/wrapper/maven-wrapper.jar b/products-microservice/.mvn/wrapper/maven-wrapper.jar
new file mode 100644
index 0000000..01e6799
Binary files /dev/null and b/products-microservice/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/products-microservice/.mvn/wrapper/maven-wrapper.properties b/products-microservice/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..cd0d451
--- /dev/null
+++ b/products-microservice/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1 @@
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip
diff --git a/products-microservice/Dockerfile b/products-microservice/Dockerfile
new file mode 100644
index 0000000..e08873e
--- /dev/null
+++ b/products-microservice/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
diff --git a/products-microservice/config-map.yml b/products-microservice/config-map.yml
new file mode 100644
index 0000000..5aedf34
--- /dev/null
+++ b/products-microservice/config-map.yml
@@ -0,0 +1,8 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: products-microservice-properties
+data:
+ spring.data.cassandra.keyspace-name: cronos
+ spring.data.cassandra.contact-points: yb-tservers.yb-demo.svc.cluster.local
+ spring.data.cassandra.port: "9042"
diff --git a/products-microservice/deployment.yml b/products-microservice/deployment.yml
new file mode 100644
index 0000000..eb282cc
--- /dev/null
+++ b/products-microservice/deployment.yml
@@ -0,0 +1,39 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: products-microservice
+ labels:
+ app: products
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: products
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: products
+ version: v1
+ spec:
+ containers:
+ - name: products
+ image: nchandrappa/products-microservice:latest
+ envFrom:
+ - configMapRef:
+ name: products-microservice-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: products-microservice
+spec:
+ selector:
+ app: products
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
\ No newline at end of file
diff --git a/products-microservice/mvnw b/products-microservice/mvnw
new file mode 100755
index 0000000..8b9da3b
--- /dev/null
+++ b/products-microservice/mvnw
@@ -0,0 +1,286 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+ # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`which java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ wget "$jarUrl" -O "$wrapperJarPath"
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ curl -o "$wrapperJarPath" "$jarUrl"
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/products-microservice/mvnw.cmd b/products-microservice/mvnw.cmd
new file mode 100644
index 0000000..fef5a8f
--- /dev/null
+++ b/products-microservice/mvnw.cmd
@@ -0,0 +1,161 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM https://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar"
+FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ echo Found %WRAPPER_JAR%
+) else (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"
+ echo Finished downloading %WRAPPER_JAR%
+)
+@REM End of extension
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/products-microservice/pom.xml b/products-microservice/pom.xml
index 7e30f39..6b08f27 100644
--- a/products-microservice/pom.xml
+++ b/products-microservice/pom.xml
@@ -14,7 +14,7 @@
org.springframework.boot
spring-boot-starter-parent
- 2.0.4.RELEASE
+ 2.2.2.RELEASE
@@ -22,8 +22,8 @@
UTF-8
UTF-8
1.8
- Finchley.RELEASE
- 2.0.0.RELEASE
+ Hoxton.RELEASE
+ 3.1.0.RELEASE
@@ -73,11 +73,6 @@
org.springframework.boot
spring-boot-devtools
-
-
- io.pivotal.spring.cloud
- spring-cloud-services-starter-config-client
-
org.springframework.boot
@@ -112,52 +107,22 @@
-
- com.fasterxml.jackson.core
- jackson-core
-
+
+ com.fasterxml.jackson.core
+ jackson-core
+
-
- com.fasterxml.jackson.core
- jackson-databind
-
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
-
- com.fasterxml.jackson.core
- jackson-annotations
-
-
-
-
- io.pivotal.spring.cloud
- spring-cloud-services-dependencies
- 2.1.2.RELEASE
- pom
- import
-
-
- org.springframework.cloud
- spring-cloud-dependencies
- Greenwich.RELEASE
- pom
- import
+
+ com.fasterxml.jackson.core
+ jackson-annotations
-
- io.pivotal.spring.cloud
- spring-cloud-services-starter-service-registry
- 2.1.2.RELEASE
-
-
- org.springframework.cloud
- spring-cloud-starter-feign
- 1.4.6.RELEASE
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
index 47f7b3e..6d558ed 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/YugabyteClientApplication.java
@@ -2,10 +2,9 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
-@EnableFeignClients
+//@EnableFeignClients
public class YugabyteClientApplication {
public static void main(String[] args) {
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/config/YugabyteYCQLConfig.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/config/YugabyteYCQLConfig.java
index 9e85cf0..0f44f49 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/config/YugabyteYCQLConfig.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/config/YugabyteYCQLConfig.java
@@ -1,59 +1,57 @@
package com.yugabyte.app.yugastore.config;
-import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
-import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Profile;
-import org.springframework.data.cassandra.config.AbstractCassandraConfiguration;
-import org.springframework.data.cassandra.config.SchemaAction;
-import org.springframework.data.cassandra.core.CassandraTemplate;
import org.springframework.data.cassandra.repository.config.EnableCassandraRepositories;
-import com.datastax.driver.core.Session;
+//@Configuration
+//@EnableAutoConfiguration
+//@Profile(value = "local")
+//class YugabyteYCQLConfig {
+//
+// @Configuration
+// @EnableCassandraRepositories(basePackages = { "com.yugabyte.app.yugastore.repo" })
+// class CassandraConfig extends AbstractCassandraConfiguration {
+//
+// @Value("${cronos.yugabyte.hostname:localhost}")
+// private String cassandraHost;
+//
+// @Value("${cronos.yugabyte.port:9042}")
+// private int cassandraPort;
+//
+// @Value("${cronos.yugabyte.keyspace:cronos}")
+// private String keyspace;
+//
+// @Override
+// public String getKeyspaceName() {
+// return keyspace;
+// }
+//
+// @Override
+// public String getContactPoints() {
+// return cassandraHost;
+// }
+//
+// @Override
+// public int getPort() {
+// return cassandraPort;
+// }
+//
+// @Override
+// public SchemaAction getSchemaAction() {
+// return SchemaAction.CREATE_IF_NOT_EXISTS;
+// }
+//
+// @Bean
+// public CassandraTemplate cassandraTemplate(Session session) {
+// return new CassandraTemplate(session);
+// }
+//
+// }
+//}
@Configuration
@EnableAutoConfiguration
-@Profile(value = "local")
+@EnableCassandraRepositories(basePackages = { "com.yugabyte.app.yugastore.repo" })
class YugabyteYCQLConfig {
-
- @Configuration
- @EnableCassandraRepositories(basePackages = { "com.yugabyte.app.yugastore.repo" })
- class CassandraConfig extends AbstractCassandraConfiguration {
-
- @Value("${cronos.yugabyte.hostname:localhost}")
- private String cassandraHost;
-
- @Value("${cronos.yugabyte.port:9042}")
- private int cassandraPort;
-
- @Value("${cronos.yugabyte.keyspace:cronos}")
- private String keyspace;
-
- @Override
- public String getKeyspaceName() {
- return keyspace;
- }
-
- @Override
- public String getContactPoints() {
- return cassandraHost;
- }
-
- @Override
- public int getPort() {
- return cassandraPort;
- }
-
- @Override
- public SchemaAction getSchemaAction() {
- return SchemaAction.CREATE_IF_NOT_EXISTS;
- }
-
- @Bean
- public CassandraTemplate cassandraTemplate(Session session) {
- return new CassandraTemplate(session);
- }
-
- }
}
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/controller/ProductCatalogController.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/controller/ProductCatalogController.java
index 77de4b2..6cbfa96 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/controller/ProductCatalogController.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/controller/ProductCatalogController.java
@@ -7,13 +7,12 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yugabyte.app.yugastore.domain.ProductMetadata;
import com.yugabyte.app.yugastore.domain.ProductRanking;
-import com.yugabyte.app.yugastore.service.ProductService;
import com.yugabyte.app.yugastore.service.ProductRankingService;
+import com.yugabyte.app.yugastore.service.ProductService;
@RestController
@RequestMapping(value = "/products-microservice")
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ImageInfo.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ImageInfo.java
index de25cbd..0609c82 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ImageInfo.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ImageInfo.java
@@ -3,9 +3,9 @@
import java.util.ArrayList;
import java.util.List;
-import org.springframework.hateoas.ResourceSupport;
+import org.springframework.hateoas.RepresentationModel;
-public class ImageInfo extends ResourceSupport {
+public class ImageInfo extends RepresentationModel {
List alsoBought;
List alsoViewed;
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ProductMetadata.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ProductMetadata.java
index 1c4632e..deffbba 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ProductMetadata.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/domain/ProductMetadata.java
@@ -2,11 +2,11 @@
import java.util.List;
import java.util.Set;
+
import org.springframework.data.cassandra.core.mapping.CassandraType;
import org.springframework.data.cassandra.core.mapping.Column;
import org.springframework.data.cassandra.core.mapping.PrimaryKey;
import org.springframework.data.cassandra.core.mapping.Table;
-import org.springframework.hateoas.ResourceSupport;
import com.datastax.driver.core.DataType.Name;
@@ -17,7 +17,6 @@ public class ProductMetadata{
@PrimaryKey(value="asin")
private String id;
- //String asin;
String brand;
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/exception/NotEnoughProductsInStockException.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/exception/NotEnoughProductsInStockException.java
index e851a95..3eebc10 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/exception/NotEnoughProductsInStockException.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/exception/NotEnoughProductsInStockException.java
@@ -1,11 +1,15 @@
package com.yugabyte.app.yugastore.exception;
-import com.yugabyte.app.yugastore.domain.ProductMetadata;
import com.yugabyte.app.yugastore.domain.ProductInventory;
+import com.yugabyte.app.yugastore.domain.ProductMetadata;
public class NotEnoughProductsInStockException extends Exception {
- private static final String DEFAULT_MESSAGE = "Not enough products in stock";
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private static final String DEFAULT_MESSAGE = "Not enough products in stock";
public NotEnoughProductsInStockException() {
super(DEFAULT_MESSAGE);
diff --git a/products-microservice/src/main/java/com/yugabyte/app/yugastore/repo/rest/ProductMetadataRestRepo.java b/products-microservice/src/main/java/com/yugabyte/app/yugastore/repo/rest/ProductMetadataRestRepo.java
index 17d16d9..d31d056 100644
--- a/products-microservice/src/main/java/com/yugabyte/app/yugastore/repo/rest/ProductMetadataRestRepo.java
+++ b/products-microservice/src/main/java/com/yugabyte/app/yugastore/repo/rest/ProductMetadataRestRepo.java
@@ -1,7 +1,7 @@
package com.yugabyte.app.yugastore.repo.rest;
-import static org.springframework.hateoas.mvc.ControllerLinkBuilder.linkTo;
-import static org.springframework.hateoas.mvc.ControllerLinkBuilder.methodOn;
+import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo;
+import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.methodOn;
import java.util.ArrayList;
import java.util.List;
diff --git a/products-microservice/src/main/resources/application.properties b/products-microservice/src/main/resources/application.properties
index 54a5c76..25a449d 100644
--- a/products-microservice/src/main/resources/application.properties
+++ b/products-microservice/src/main/resources/application.properties
@@ -1,5 +1,9 @@
logging.level.org.springframework.web=INFO
-cronos.yugabyte.keyspace=cronos
-cronos.yugabyte.hostname=127.0.0.1
-cronos.yugabyte.port=9042
-spring.profiles.active=local
+#cronos.yugabyte.keyspace=cronos
+#cronos.yugabyte.hostname=10.100.200.225
+#cronos.yugabyte.port=9042
+
+spring.data.cassandra.keyspace-name=cronos
+spring.data.cassandra.contact-points=35.245.245.126
+spring.data.cassandra.port=9042
+#spring.profiles.active=local
diff --git a/products-microservice/src/main/resources/bootstrap.yml b/products-microservice/src/main/resources/bootstrap.yml
index a9684ee..592a444 100644
--- a/products-microservice/src/main/resources/bootstrap.yml
+++ b/products-microservice/src/main/resources/bootstrap.yml
@@ -1,9 +1,9 @@
spring:
application:
name: products-microservice
-server:
- port: 8082
-eureka:
- client:
- serviceUrl:
- defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
+#server:
+# port: 8082
+#eureka:
+# client:
+# serviceUrl:
+# defaultZone: ${EUREKA_URI:http://localhost:8761/eureka}
\ No newline at end of file
diff --git a/react-ui/.classpath b/react-ui/.classpath
index a5d9509..39abf1c 100644
--- a/react-ui/.classpath
+++ b/react-ui/.classpath
@@ -28,5 +28,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/react-ui/.project b/react-ui/.project
index afcc2f4..7108e2d 100644
--- a/react-ui/.project
+++ b/react-ui/.project
@@ -16,17 +16,17 @@
- org.eclipse.m2e.core.maven2Builder
+ org.springframework.ide.eclipse.core.springbuilder
- org.springframework.ide.eclipse.core.springbuilder
+ org.springframework.ide.eclipse.boot.validation.springbootbuilder
- org.springframework.ide.eclipse.boot.validation.springbootbuilder
+ org.eclipse.m2e.core.maven2Builder
diff --git a/react-ui/.settings/org.eclipse.core.resources.prefs b/react-ui/.settings/org.eclipse.core.resources.prefs
index 99f26c0..839d647 100644
--- a/react-ui/.settings/org.eclipse.core.resources.prefs
+++ b/react-ui/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,5 @@
eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
encoding/=UTF-8
diff --git a/react-ui/.settings/org.eclipse.jdt.core.prefs b/react-ui/.settings/org.eclipse.jdt.core.prefs
index 9c81ef9..951833c 100644
--- a/react-ui/.settings/org.eclipse.jdt.core.prefs
+++ b/react-ui/.settings/org.eclipse.jdt.core.prefs
@@ -2,6 +2,9 @@ eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.methodParameters=generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
diff --git a/react-ui/Dockerfile b/react-ui/Dockerfile
new file mode 100644
index 0000000..e08873e
--- /dev/null
+++ b/react-ui/Dockerfile
@@ -0,0 +1,5 @@
+FROM openjdk:8-jdk-alpine
+VOLUME /tmp
+ARG JAR_FILE=target/*.jar
+COPY ${JAR_FILE} app.jar
+ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
diff --git a/react-ui/config-map.yml b/react-ui/config-map.yml
new file mode 100644
index 0000000..e8c026b
--- /dev/null
+++ b/react-ui/config-map.yml
@@ -0,0 +1,6 @@
+kind: ConfigMap
+apiVersion: v1
+metadata:
+ name: yugastore-ui-properties
+data:
+ cronos.yugabyte.api: http://api-gateway.default.svc.cluster.local:8080/api/v1/
diff --git a/react-ui/deployment.yml b/react-ui/deployment.yml
new file mode 100644
index 0000000..1e9fbdb
--- /dev/null
+++ b/react-ui/deployment.yml
@@ -0,0 +1,39 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: sappho-retailapp-ui
+ labels:
+ app: ui
+ version: v1
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: ui
+ version: v1
+ template:
+ metadata:
+ labels:
+ app: ui
+ version: v1
+ spec:
+ containers:
+ - name: sappho-retailapp-ui
+ image: nchandrappa/sappho-retailapp-ui
+ envFrom:
+ - configMapRef:
+ name: yugastore-ui-properties
+ ports:
+ - containerPort: 8080
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: yugastore-ui
+spec:
+ selector:
+ app: ui
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
diff --git a/react-ui/frontend/package-lock.json b/react-ui/frontend/package-lock.json
index 2acfb3a..d07be3e 100644
--- a/react-ui/frontend/package-lock.json
+++ b/react-ui/frontend/package-lock.json
@@ -4297,7 +4297,7 @@
"requires": {
"assert-plus": "0.2.0",
"jsprim": "1.4.0",
- "sshpk": "1.13.2"
+ "sshpk": "1.13.0"
}
},
"inflight": {
@@ -4348,7 +4348,8 @@
},
"jsbn": {
"version": "0.1.1",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"json-schema": {
"version": "0.2.3",
@@ -4620,7 +4621,7 @@
}
},
"sshpk": {
- "version": "1.13.2",
+ "version": "1.13.0",
"bundled": true,
"optional": true,
"requires": {
@@ -4717,7 +4718,8 @@
},
"tweetnacl": {
"version": "0.14.5",
- "bundled": true
+ "bundled": true,
+ "optional": true
},
"uid-number": {
"version": "0.0.6",
diff --git a/react-ui/service.yaml b/react-ui/service.yaml
new file mode 100644
index 0000000..7dda38f
--- /dev/null
+++ b/react-ui/service.yaml
@@ -0,0 +1,12 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: sappho-retailapp-ui-lb
+spec:
+ type: LoadBalancer
+ selector:
+ app: ui
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
\ No newline at end of file
diff --git a/react-ui/src/main/resources/application.properties b/react-ui/src/main/resources/application.properties
index ae1a48a..6e02c94 100644
--- a/react-ui/src/main/resources/application.properties
+++ b/react-ui/src/main/resources/application.properties
@@ -1,3 +1,2 @@
-cronos.yugabyte.api=http://localhost:8081/api/v1/
-server.port=8080
+#cronos.yugabyte.api=http://localhost:8081/api/v1/
logging.level.org.springframework.web=INFO
diff --git a/resources/dataload.sh b/resources/dataload.sh
index c6168c1..7d52584 100755
--- a/resources/dataload.sh
+++ b/resources/dataload.sh
@@ -1,8 +1,8 @@
for i in products.json;
do
python parse_metadata_json.py $i;
- ./cassandra-loader -f cronos_products.csv -host localhost -schema "cronos.products(asin, title, description, price, imUrl, also_bought, also_viewed, bought_together, buy_after_viewing, brand, categories,num_reviews,num_stars,avg_stars)" -maxInsertErrors 10000 -maxErrors 10000 -charsPerColumn 256000;
- ./cassandra-loader -f cronos_product_rankings.csv -host localhost -schema "cronos.product_rankings(asin, category, sales_rank, title, price, imurl, num_reviews, num_stars, avg_stars)" -maxInsertErrors 10000 -maxErrors 10000 -charsPerColumn 256000;
- ./cassandra-loader -f cronos_product_inventory.csv -host localhost -schema "cronos.product_inventory(asin, quantity)";
+ ./cassandra-loader -f cronos_products.csv -host $CQLSH_HOST -port $CQLSH_PORT -schema "cronos.products(asin, title, description, price, imUrl, also_bought, also_viewed, bought_together, buy_after_viewing, brand, categories,num_reviews,num_stars,avg_stars)" -maxInsertErrors 10000 -maxErrors 10000 -charsPerColumn 256000;
+ ./cassandra-loader -f cronos_product_rankings.csv -host $CQLSH_HOST -port $CQLSH_PORT -schema "cronos.product_rankings(asin, category, sales_rank, title, price, imurl, num_reviews, num_stars, avg_stars)" -maxInsertErrors 10000 -maxErrors 10000 -charsPerColumn 256000;
+ ./cassandra-loader -f cronos_product_inventory.csv -host $CQLSH_HOST -port $CQLSH_PORT -schema "cronos.product_inventory(asin, quantity)";
rm *.csv*
-done
+done
\ No newline at end of file
diff --git a/yugastore-java-architecture.png b/yugastore-java-architecture.png
deleted file mode 100644
index 63ae8e0..0000000
Binary files a/yugastore-java-architecture.png and /dev/null differ
diff --git a/yugastore-java-k8s-architecture.png b/yugastore-java-k8s-architecture.png
new file mode 100644
index 0000000..7c38264
Binary files /dev/null and b/yugastore-java-k8s-architecture.png differ