Bean Creation Exception in Springboot

Joined
Nov 6, 2022
Messages
1
Reaction score
0
Hello,
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:

Screen Shot 2022-11-06 at 8.49.40 PM.png


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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top