org.jarbframework.sample.PostPopulator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jarb-sample Show documentation
Show all versions of jarb-sample Show documentation
Sample application that demonstrates all modules.
package org.jarbframework.sample;
import org.jarbframework.populator.DatabasePopulator;
import org.springframework.beans.factory.annotation.Autowired;
public class PostPopulator implements DatabasePopulator {
@Autowired
private PostRepository postRepository;
@Override
public void populate() {
Post post = new Post();
post.setAuthor("[email protected]");
post.setTitle("inserted via java");
post.setMessage("some message");
postRepository.save(post);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy