title: Spring boot data insertion after spring boot starts
body: <p>I am developing web project in  spring boot. I'm using hibernate jpa and spring security. I need to create some user when the spring boot app is started using some service. I have tried using <code>@PostConstruct</code> annotation, but it's not inserting data to db.</p>
  
  <pre><code>@Component
  public class Monitor {
      @Autowired private UserService service
  
      @PostConstruct
      public void init(){
          if(!service.findBySsoId('admin')) {
              service.save(new User(ssoId: 'admin',
              lastName: 'amdmin',
                      firstName: 'admin',
                      contactNumber: '9999999999',
                      password: '11changeme',
                      address2: '',
                      address1: '',
                      city: ''
              ),[UserProfileType.ADMIN,UserProfileType.USER,UserProfileType.DBA])
          }
      }
  }
  </code></pre>
  
  <p>In <code>grails</code>  I've done this by adding it in <code>bootstrap.groovy</code>, in spring boot how can I do that ?</p>