maciejwalkowiak / just

Magical 🪄 command line toolkit for developing 🍃 Spring Boot apps
312 stars 6 forks source link

No postgres database started #47

Open zelaskoa opened 1 year ago

zelaskoa commented 1 year ago

Hi when i run "just run mymodule" no postgres database is started although i have database configurations in my pom.xml

            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>
                <version>${org.springframework.boot.version}</version>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${postgres.version}</version>
            </dependency>
spring:
  jpa:
    database: POSTGRESQL
    open-in-view: false
    properties:
      hibernate:
        dialect: org.hibernate.dialect.PostgreSQLDialect
        jdbc:
          time_zone: Europe/Berlin

  datasource:
    url: ....
    username: ...
    password: ...
    driverClassName: org.postgresql.Driver
    hikari:
      connectionTimeout: 20000
      maximumPoolSize: 5
      data-source-properties:
        stringtype: unspecified
maciejwalkowiak commented 1 year ago

When spring.datasource.url is set, Just assumes that you want to connect to other database than the one set up by Just.

To start database with Just and configure app to use it, you need to remove following properties:

spring:
  datasource:
    url: ....
    username: ...
    password: ...

Let me know if you still have issues