Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beginner help: db/postgres properties and basic gradlew #9

Open
seanoc5 opened this issue Jan 1, 2025 · 0 comments
Open

Beginner help: db/postgres properties and basic gradlew #9

seanoc5 opened this issue Jan 1, 2025 · 0 comments

Comments

@seanoc5
Copy link

seanoc5 commented Jan 1, 2025

Hi, my experience with gradle is fairly basic. I'm not familiar with the nuances of having multiple subprojects in on repo.
I'm starting with the semantic-search example, and stumbled upon this gradle command to start that "subproject" from the repo 'root' folder:
./gradlew :use-cases:semantic-search:bootTestRun
which seems to correctly use a testContainer for postgres (with pgvector enabled). I do also have a non-containerized postgres service running by default, but stopped it while working on understanding the demo apps (and using testContainers)

The command in the readme :
./gradlew bootTestRun
fails in the semantic-search folder because there is no ./gradlew.
Perhaps I am lacking some basic/implied understanding of gradle/gradlew?
This is more of checking my sanity/understanding rather than an actual problem or issue. Is this 'best practice' or is there a better approach I should take?

Second: I notice the application.yml for each subproject does not have datasource settings. This again is likely me having missed something basic/implied in the configuration. Should I be adding something like the following to each of the sub application.yml files?

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/thomasvitale
    username: myuser
    password: mypass
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: update
    show-sql: true

In any event, thanks for publishing this repo with great examples. These are a huge help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant