skip to Main Content

MySql and Docker com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

I want to put my spring rest api with database in mysql in Docker. application.properties file: server.port=8082 spring.datasource.url=jdbc:mysql://database:8083/schoolregistrationsystem spring.datasource.username=user spring.datasource.password=pwd spring.jpa.hibernate.ddl-auto=none spring.liquibase.change-log=classpath:/db/changelog/dbchangelog.xml spring.mvc.pathmatch.matching-strategy = ANT_PATH_MATCHER Next I created docker-compose.yml file in directory with project: version: "3.8" services: api: build: ./SchoolRegistrationSystem…

VIEW QUESTION

How to access localhost from within docker image

I have B application which calls A application. Here are the source code for them: A application : @SpringBootApplication @RestController @Slf4j public class AApplication { public static void main(String[] args) { SpringApplication.run(AApplication.class, args); } @GetMapping("call_a") public double callA() { log.info("calling…

VIEW QUESTION
Back To Top
Search