Не запускаются контейнеры Docker compose

Собрал приложение на Java Spring Boot с базой данных PostgreSQL, задача стоит запустить приложение в Docker Compose(отдельным контейнером база и отдельно приложение), вот файл compose.yaml

version: '3.1'
services:
  postgres:
    image: 'postgres:16.2'
    environment:
      - 'POSTGRES_DB=postgres'
      - 'POSTGRES_PASSWORD=123'
      - 'POSTGRES_USER=postgres'
    ports:
      - '5438:5438'
  app:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - '8080:8080'

Вот Dockerfile

FROM openjdk:17
LABEL authors="labazov"
WORKDIR /app
COPY out/artifacts/api_wallet_jar/api_wallet.jar api_wallet.jar
EXPOSE 8080
CMD ["java", "-jar", "api_wallet.jar"]

Вот application.yml

spring:
  datasource:
    url: jdbc:postgresql://localhost:5438/postgres
    username: postgres
    password: 123
    driver-class-name: org.postgresql.Driver
  jpa:
    database: postgresql
    database-platform: org.hibernate.dialect.PostgreSQLDialect
  liquibase:
    enabled: true
  application:
    name: api_wallet
  sql:
    init:
      mode: always

введите сюда описание изображения

введите сюда описание изображения

Вот структура проекта


2024-05-15 19:02:54 2024-05-15T12:02:54.886Z ERROR 1 --- [api_wallet] [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.InvalidDataAccessResourceUsageException: JDBC exception executing SQL [select w1_0.id,w1_0.account from wallet w1_0 where w1_0.id=?] [ERROR: relation "wallet" does not exist
2024-05-15 19:02:54   Position: 34] [n/a]; SQL [n/a]] with root cause
2024-05-15 19:02:54 
2024-05-15 19:02:54 org.postgresql.util.PSQLException: ERROR: relation "wallet" does not exist
2024-05-15 19:02:54   Position: 34
2024-05-15 19:02:54     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2401) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:368) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:498) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:415) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:190) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:134) ~[postgresql-42.6.2.jar!/:42.6.2]
2024-05-15 19:02:54     at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[HikariCP-5.0.1.jar!/:na]
2024-05-15 19:02:54     at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[HikariCP-5.0.1.jar!/:na]
2024-05-15 19:02:54     at org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.executeQuery(DeferredResultSetAccess.java:246) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.jdbc.internal.DeferredResultSetAccess.getResultSet(DeferredResultSetAccess.java:167) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.advanceNext(JdbcValuesResultSetImpl.java:218) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.jdbc.internal.JdbcValuesResultSetImpl.processNext(JdbcValuesResultSetImpl.java:98) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.jdbc.internal.AbstractJdbcValues.next(AbstractJdbcValues.java:19) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.internal.RowProcessingStateStandardImpl.next(RowProcessingStateStandardImpl.java:66) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:187) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.results.spi.ListResultsConsumer.consume(ListResultsConsumer.java:33) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.doExecuteQuery(JdbcSelectExecutorStandardImpl.java:209) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.exec.internal.JdbcSelectExecutorStandardImpl.executeQuery(JdbcSelectExecutorStandardImpl.java:83) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:76) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.sql.exec.spi.JdbcSelectExecutor.list(JdbcSelectExecutor.java:65) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.ast.internal.SingleIdLoadPlan.load(SingleIdLoadPlan.java:145) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.ast.internal.SingleIdLoadPlan.load(SingleIdLoadPlan.java:117) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.ast.internal.SingleIdEntityLoaderStandardImpl.load(SingleIdEntityLoaderStandardImpl.java:75) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.persister.entity.AbstractEntityPersister.doLoad(AbstractEntityPersister.java:3748) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3737) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:604) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.loadFromCacheOrDatasource(DefaultLoadEventListener.java:590) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:560) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:544) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:207) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.loadWithRegularProxy(DefaultLoadEventListener.java:290) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:242) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:111) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:138) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.internal.SessionImpl.fireLoadNoChecks(SessionImpl.java:1222) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1210) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.internal.IdentifierLoadAccessImpl.load(IdentifierLoadAccessImpl.java:209) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.internal.IdentifierLoadAccessImpl.doLoad(IdentifierLoadAccessImpl.java:160) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.internal.IdentifierLoadAccessImpl.lambda$load$1(IdentifierLoadAccessImpl.java:149) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.internal.IdentifierLoadAccessImpl.perform(IdentifierLoadAccessImpl.java:112) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.loader.internal.IdentifierLoadAccessImpl.load(IdentifierLoadAccessImpl.java:149) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.internal.SessionImpl.get(SessionImpl.java:1023) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.lambda$entityIsDetached$0(DefaultMergeEventListener.java:407) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.engine.spi.LoadQueryInfluencers.fromInternalFetchProfile(LoadQueryInfluencers.java:99) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.entityIsDetached(DefaultMergeEventListener.java:405) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.merge(DefaultMergeEventListener.java:208) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.doMerge(DefaultMergeEventListener.java:146) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:130) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.internal.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.event.service.internal.EventListenerGroupImpl.fireEventOnEachListener(EventListenerGroupImpl.java:127) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.internal.SessionImpl.fireMerge(SessionImpl.java:847) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at org.hibernate.internal.SessionImpl.merge(SessionImpl.java:833) ~[hibernate-core-6.4.4.Final.jar!/:6.4.4.Final]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2024-05-15 19:02:54     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
2024-05-15 19:02:54     at org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:364) ~[spring-orm-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at jdk.proxy2/jdk.proxy2.$Proxy109.merge(Unknown Source) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2024-05-15 19:02:54     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
2024-05-15 19:02:54     at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:319) ~[spring-orm-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at jdk.proxy2/jdk.proxy2.$Proxy109.merge(Unknown Source) ~[na:na]
2024-05-15 19:02:54     at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:621) ~[spring-data-jpa-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2024-05-15 19:02:54     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
2024-05-15 19:02:54     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:354) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryMethodInvoker$RepositoryFragmentMethodInvoker.lambda$new$0(RepositoryMethodInvoker.java:277) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryMethodInvoker.doInvoke(RepositoryMethodInvoker.java:170) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryMethodInvoker.invoke(RepositoryMethodInvoker.java:158) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:516) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:285) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:628) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.doInvoke(QueryExecutorMethodInterceptor.java:168) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.invoke(QueryExecutorMethodInterceptor.java:143) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:70) ~[spring-data-commons-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123) ~[spring-tx-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:392) ~[spring-tx-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119) ~[spring-tx-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137) ~[spring-tx-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:164) ~[spring-data-jpa-3.2.5.jar!/:3.2.5]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:223) ~[spring-aop-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at jdk.proxy2/jdk.proxy2.$Proxy113.save(Unknown Source) ~[na:na]
2024-05-15 19:02:54     at com.example.api_wallet.controllers.WalletController.newWallet(WalletController.java:40) ~[!/:0.0.1-SNAPSHOT]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
2024-05-15 19:02:54     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
2024-05-15 19:02:54     at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
2024-05-15 19:02:54     at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:255) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:188) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:926) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:831) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885) ~[spring-webmvc-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:206) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) ~[tomcat-embed-websocket-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.1.6.jar!/:6.1.6]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:175) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:150) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:896) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1736) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63) ~[tomcat-embed-core-10.1.20.jar!/:na]
2024-05-15 19:02:54     at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]

Таблица в контейнере

postgres=# \du
                             List of roles
 Role name |                         Attributes                         
-----------+------------------------------------------------------------
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS

postgres=# \dt
                 List of relations
 Schema |         Name          | Type  |  Owner   
--------+-----------------------+-------+----------
 public | databasechangelog     | table | postgres
 public | databasechangeloglock | table | postgres
 public | wallets               | table | postgres
(3 rows)

postgres=# SELECT * FROM wallets;
 id | account 
----+---------
(0 rows)

Я уже совсем отчаялся и не понимаю, что я делаю не так, помогите


Ответы (1 шт):

Автор решения: Deniska SosiSka

У Вас ошибка подключения к бд.

Посмотрите вот это.

Так-же стандартный порт для подключения к postgresql - 5432

Нужно в application.yml, заместо localhost:5438 указать postgres:5432.

→ Ссылка