- Joined
- Nov 6, 2022
- Messages
- 1
- Reaction score
- 0
Hello,
I have ane entity class InAppNotification.java that looks like this:
Am using JPA to handle the database queries and this is how the jpa interface is defined:
Finally, this is how my application.properties looks like:
However, when I start the application after building by running
java -jar {filename.jar}
This is the issue that I am getting:
I am almost a beginner with JPA and beans, so some help would be greatly appreciated. Please let me know if you need further info.
Thanks
I have ane entity class InAppNotification.java that looks like this:
Java:
@Entity
@Table(name = "notification")
public class InAppNotification {
@Column(name = "inapptext")
String text;
@Column(name = "deeplink")
String deepLink;
@Column(name = "userid")
Integer userId;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
Long id;
@Column(name = "isread")
Boolean isRead = false;
Am using JPA to handle the database queries and this is how the jpa interface is defined:
Java:
public interface InAppNotificationRepository extends JpaRepository<InAppNotification, Long> {
List<InAppNotification> findByUserId(@Param("userid") Integer userId);
}
Finally, this is how my application.properties looks like:
JSON:
spring.datasource.url= jdbc:postgresql://....
spring.datasource.username= ....
spring.datasource.password= ....
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation= true
spring.jpa.properties.hibernate.dialect= org.hibernate.dialect.PostgreSQLDialect
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
# Hibernate ddl auto (create, create-drop, validate, update)
spring.jpa.hibernate.ddl-auto= update
However, when I start the application after building by running
java -jar {filename.jar}
This is the issue that I am getting:
I am almost a beginner with JPA and beans, so some help would be greatly appreciated. Please let me know if you need further info.
Thanks