minor formatting work
This commit is contained in:
parent
c9aba4eeff
commit
4631f7e915
|
@ -8,10 +8,10 @@ import org.springframework.data.mongodb.core.mapping.DBRef;
|
|||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
public class CascadeCallback implements ReflectionUtils.FieldCallback {
|
||||
|
||||
|
||||
private Object source;
|
||||
private MongoOperations mongoOperations;
|
||||
|
||||
|
||||
public CascadeCallback(final Object source, final MongoOperations mongoOperations) {
|
||||
this.source = source;
|
||||
this.setMongoOperations(mongoOperations);
|
||||
|
|
|
@ -6,10 +6,10 @@ import org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventLis
|
|||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
public class CascadeSaveMongoEventListener extends AbstractMongoEventListener<Object> {
|
||||
|
||||
|
||||
@Autowired
|
||||
private MongoOperations mongoOperations;
|
||||
|
||||
|
||||
@Override
|
||||
public void onBeforeConvert(final Object source) {
|
||||
ReflectionUtils.doWithFields(source.getClass(), new CascadeCallback(source, mongoOperations));
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.springframework.data.mongodb.core.query.Query;
|
|||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = MongoConfig.class)
|
||||
public class MongoTemplateQueryIntegrationTest {
|
||||
|
|
Loading…
Reference in New Issue