Created
March 25, 2013 12:01
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableCaching | |
@ComponentScan(basePackageClasses = {UserRepository.class}) | |
@Slf4j | |
public class MongoCacheConfiguration extends AbstractMongoConfiguration { | |
@Override | |
protected String getDatabaseName() { | |
return "debop4j_core_cache"; | |
} | |
@Override | |
@Bean | |
public Mongo mongo() throws Exception { | |
return new Mongo("localhost"); | |
} | |
@Bean | |
public MongoCacheManager mongoCacheManager() throws Exception { | |
return new MongoCacheManager(mongoTemplate()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment