package com.example.Firstproject.Repository;
import org.springframework.data.mongodb.repository.MongoRepository;
import com.example.Firstproject.Model.JournalEntry;
import org.springframework.stereotype.Repository;
@Repository
public interface JournalEntryRepository extends MongoRepository<JournalEntry, String> {
// You can define custom query methods here if needed
}
Correction -
Fix the import: Use org.springframework.data.mongodb.repository.MongoRepository instead of the incorrect one.
Add generics: Specify the entity type and ID type like <JournalEntry, String>.
Follow naming conventions: Rename jarnalentryrepository to JournalEntryRepository.
Add @Repository annotation.
Please rename the file to JournalEntryRepository.java
to match the updated class name JournalEntryRepository
and follow Java naming conventions.