MongoDB
 SQL >> Database >  >> NoSQL >> MongoDB

MongoDB - Consider defining a bean of type 'org.springframework.data.mongodb.repository.query.MongoEntityInformation' in your configuration

Tanto per cominciare vorrei dire che NON USARE UNA CLASSE IMPLEMENTATIVA, USA INVECE UN'INTERFACCIA.

Dichiara un'interfaccia ed estendila da MongoRepository<T,ID>: Spring fornirà l'implementazione out-of-the-box.

@Repository
public interface StudentMongoRepository extends MongoRepository<T,ID> {
    @Autowired
    private MongoOperations mongoOperations;

Questo dovrebbe funzionare.