This and similar questions don't solve my question.
I'm trying to connect my application to a MySQL server to no avail. I can't seem to find the error that causes this connection failure.
This is the full error log: https://pastebin.com/t54pVb58
This is my docker-compose.yml:
version: '3.8'
services:
  mysql-ricette:
    container_name: mysqlRicette
    image: mysql
    volumes:
      - ./mysql:/docker-entrypoint-initdb.d
    ports:
      - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: root_password
      MYSQL_DATABASE: ricette
      MYSQL_USER: user
      MYSQL_PASSWORD: password
  ricette-service:
    container_name: ricette
    build: ./ricette
    depends_on:
      - consul
      - mysql-ricette
      - kafka
      - zookeeper
This is my application.yml for ricette-service: https://pastebin.com/PNhF532g
And this is the Entity I'd like to save in the database:
@Entity 
@Data @NoArgsConstructor
public class RicettaCompleta {
    @Id 
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id; 
    private String autore; 
    private String titolo; 
    private String preparazione; 
    
    public RicettaCompleta(String autore, String titolo, String preparazione) {
        this(); 
        this.autore = autore; 
        this.titolo = titolo; 
        this.preparazione = preparazione; 
    }
    
}
I know that this error means that something is wrong with the datasource configuration. But I have no idea what. Yes the mysql-ricette DB is actually running.
Please help my fix this error that I keep getting.
 
    