skip to Main Content

Spring Boot + MySQL Docker Compose: port exposure refused connection

Spring Boot + MySQL + Docker here. I have the following docker-compose.yml: version: "3.8" services: myappws_mono_db: image: mysql:8.0.32 restart: unless-stopped environment: - MYSQL_ROOT_PASSWORD=$MAIN_DB_ROOT_PASSWORD - MYSQL_DATABASE=$MAIN_DB_DATABASE - MYSQL_CHARSET=utf8mb4 - MYSQL_COLLATION=utf8mb4_0900_ai_ci - MYSQL_ENGINE=InnoDB ports: - $MAIN_DB_PORT:$MAIN_DB_DOCKER_PORT volumes: - db:/var/lib/mysql myappws: depends_on: -…

VIEW QUESTION

How to connect MySQL Database to Spring boot 3?

I am writing Restful API in Spring boot 3 with java 17 and i am unable to create table .Can anyone please help POM File <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.0.3</version> <relativePath/> <!--…

VIEW QUESTION

Can not deserialize JSON with json string inside

I have a json like below. The x's are there to omit sensitive data {"errormessage":"{"timestamp":"2021-10- 19T07:57:35.205+0000","status":400,"error": "Bad Request","message":"Bad Request: xxxx xxx xxx xxx xxx. pathu003d/xxx/verify","path":"/xxx /xxx"}"} I am trying to deserialize this json into the class below public class TransferResponse…

VIEW QUESTION
Back To Top
Search