i'm new with spring.
I'm using maven to build my webapp. I have the following structs:
- pom.xml
- src/main/[java/resources]
there is no *.xml file, *.conf or *.properties... nothing.
Application.java
@Autowired
private UserRepository repository;
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
public void run(String... args) throws Exception {
repository.deleteAll();
repository.save(new User("test", "123"));
List<User> users = repository.findByLogin("test");
...
}
Also, User.java and UserRepository.java
public interface UserRepository extends MongoRepository<User, String> {
public List<User> findByLogin(String login);
}
and it works!!!
my question is: How I change the configuration of mongo? database, password??
thanks!