Category : spring-boot

My front-end application was build on Angular and back-end on Spring-boot. Connection between them works great on development. But on the deployment (with Docker) it gets messy with CORS. I get status with 0, which makes me thinking that the request is not sent at all. When I send POSTMAN or cURL to backend (http://localhost:8081/api/*) ..

Read more

I have springboot application run as docker in kubernetes and it have ‘spring.output.ansi.enabled’ set to ‘always’. Now I want my filebeat consume the log from the springboot docker logging but the output showing me ANSI character in elasticsearch. [2m2021-09-08 15:30:00.238[0;39m [32m INFO[0;39m [35m1[0;39m … And log file looks something like this u001b[2m2021-09-08 15:23:00.213u001b[0;39m … Here ..

Read more

While trying to create docker build, getting error as below: Status: Downloaded newer image for adoptopenjdk/openjdk11:alpine-jre —> fcb7960593e0 Step 13/18 : ENV ARTIFACT_NAME=userservice.jar —> Running in f9cb2c5751ce Removing intermediate container f9cb2c5751ce —> a8d457c0023a Step 14/18 : ENV APP_HOME=/usr/app/ —> Running in 4376cb0c3120 Removing intermediate container 4376cb0c3120 —> 6df0ab62c566 Step 15/18 : WORKDIR $APP_HOME —> Running ..

Read more

i have a spring boot application which i am trying to connect to two mysql instances running in different containers, No problem when running in local , but when containerizing my spring boot app Problem of connection is occurring 2021-09-07 18:07:06.545 INFO 6 — [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2021-09-07 18:07:06.547 INFO ..

Read more

In my hello world app I’m using application properties to define ‘name’. It works fine, but I want to define ‘name’ in docker CMD. Service: @Service public class HelloService { @Value("${name}") private String name; @GetMapping("/greeting") public String greeting() { return "Hello, " + name; } } application.properties: name=Tommy Dockerfile: FROM openjdk:11 ARG JAR_FILE=target/*.jar COPY ${JAR_FILE} ..

Read more