コード例 #1
0
ファイル: AdminREST.java プロジェクト: hanxue/commafeed
 @Path("/settings")
 @POST
 @ApiOperation(value = "Save application settings", notes = "Save application settings")
 public Response saveSettings(@ApiParam(required = true) ApplicationSettings settings) {
   Preconditions.checkNotNull(settings);
   applicationSettingsService.save(settings);
   return Response.ok().build();
 }
コード例 #2
0
ファイル: StartupBean.java プロジェクト: Tomvl117/commafeed
  private void initialData() {
    log.info("Populating database with default values");

    ApplicationSettings settings = new ApplicationSettings();
    settings.setAnnouncement("Set the Public URL in the admin section !");
    applicationSettingsService.save(settings);

    userService.register(USERNAME_ADMIN, "admin", Arrays.asList(Role.ADMIN, Role.USER));
    userService.register(USERNAME_DEMO, "demo", Arrays.asList(Role.USER));
  }