package etunicorn; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; /** * Created by geoffrey on 28/01/17. */ @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } @Bean public CommandLineRunner demo(PermissionRepository permissionRepository) { return (args) -> { permissionRepository.save(new Permission("ROLE_ADMIN")); permissionRepository.save(new Permission("CONSO_ADMIN")); permissionRepository.save(new Permission("EVNMT_ADMIN")); // ... }; } }