#Fitness Application ( Coach )
37 messages ยท Page 1 of 1 (latest)
how ?
Can you show your controller?
here is my controller
can you see the problem ?
That doesn't seem to do sign-in logic
how should i fix it then ?
Can you show the controller doing the sign in?
here's my AuthController image
Are you getting any logs when making the request?
give me second i'll send the logs
this is all i get i think
the error is in this section ๐
PSQLException: ERROR: relation "user" does not exist
that's in the logs
you don't have a user table in your DB
But i have user table
Let me double check again
maybe it's in the wrong DB
i created a database (coachdb) and because i'm using JDBC i introduce my entity (User) to database using CrudRepository and when i check my database tables all of them are valid let me show you
The application is using Postgres, not couchdb
NOT COUCH DB , Coach db as a Athlete and Coach
ah ok
this is my database and tables
How is your application connected to it?
spring:
main:
web-application-type: servlet
application:
name: CoachBackend
user-route: "api/v1/users/"
auth-route: "api/v1/auth/"
datasource:
url: jdbc:postgresql://localhost:5432/coachdb
username: amirgolmoradi
password: password
driver-class-name: org.postgresql.Driver
hikari:
minimum-idle: 5
maximum-pool-size: 10
idle-timeout: 30000
connection-timeout: 20000
jpa:
hibernate:
ddl-auto: validate
show-sql: true
properties:
hibernate:
format_sql: true
# SECURITY CONFIG
security:
user:
name: admin
password: admin
jwt:
secret-key: 3d4d28498689bac821ec4b1718fe41ac93bc56e6540eaa76e09679184efc87d1
expiration-time: 1_296_000_000 // 15 Days
# Flyway Configuration
flyway:
enabled: true
baseline-on-migrate: true
locations: db/migration
# Logging Configuration
logging:
level:
org.springframework.security: trace
If you still need more details , i'll be happy if you check the source code
all of my Dao / Repository /Security is on Infrastructure folder
Entity is on Domain Folder
Controller is on Presentation
try setting the schema name to public
Ok, but i don't think that i'm using hibernate but i check this
it's just a different property
change the spring.datasource.url to jdbc:postgresql://localhost:5432/coachdb?currentSchema=public
hey buddy i fixed the problem