DATAREST-163 - Fixed rendering of embedded documents for MongoDB.

Removed the attempt to add a link to the response for non-associations. Switched to the usage of Simple(Property|Association)Handlers for simplified generics.
This commit is contained in:
Oliver Gierke
2013-11-14 09:48:37 +00:00
parent f965363650
commit 8f2e3eb4fe
7 changed files with 116 additions and 11 deletions

View File

@@ -2,7 +2,6 @@ package org.springframework.data.rest.core.domain.mongodb;
import java.net.UnknownHostException;
import com.mongodb.Mongo;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@@ -11,17 +10,19 @@ import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
import com.mongodb.MongoClient;
/**
* @author Jon Brisbin
*/
@Configuration
@ComponentScan(basePackageClasses = { MongoDbRepositoryConfig.class })
@ComponentScan
@EnableMongoRepositories
public class MongoDbRepositoryConfig {
@Bean
public MongoDbFactory mongoDbFactory() throws UnknownHostException {
return new SimpleMongoDbFactory(new Mongo("localhost"), "spring-data-rest");
return new SimpleMongoDbFactory(new MongoClient("localhost"), "spring-data-rest");
}
@Bean