fix package name
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.baeldung.config;
|
||||
|
||||
import com.mongodb.Mongo;
|
||||
import com.mongodb.MongoClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
|
||||
|
||||
@Configuration
|
||||
@EnableMongoRepositories(basePackages = "com.baeldung.repository")
|
||||
public class SimpleMongoConfig {
|
||||
|
||||
@Bean
|
||||
public Mongo mongo() throws Exception {
|
||||
return new MongoClient("localhost");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MongoTemplate mongoTemplate() throws Exception {
|
||||
return new MongoTemplate(mongo(), "test");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user