@@ -250,27 +250,6 @@ private void initialize() {
250250 saveButton .setOnAction (ae -> {
251251 LOG .info ("Save clicked" );
252252
253- //*******************************************************************************
254- // String authPortValue = authPort.getText();
255- // propertyWrite("server.port",authPortValue);
256- Properties properties = new Properties ();
257- try {
258- properties .load (getClass ().getClassLoader ().getResourceAsStream (propertiesFilePath ));
259-
260- String authPortValue = authPort .getText ();
261-
262- properties .setProperty ("server.port" , authPortValue );
263- // properties.setProperty("spring.main.web-application-type", "none");
264-
265- System .err .println (authPortValue );
266- FileOutputStream outputStream = new FileOutputStream (propertiesFilePath );
267- properties .store (outputStream , null );
268- outputStream .close ();
269-
270- } catch (IOException e ) {
271- e .printStackTrace ();
272- }
273-
274253 RadioButton selectedRadioButton = (RadioButton ) toggleGroup .getSelectedToggle ();
275254
276255 if (selectedRadioButton == radioApiOff ) {
@@ -349,8 +328,6 @@ private void initialize() {
349328
350329 }
351330
352-
353-
354331 private static void setRegionSvg (Region region , double requiredWidth , double requiredHeight , RESOURCE resource ) {
355332
356333 region .setShape (SvgNodeProvider .getSvgNodeWithScale (resource , 1.0 , 1.0 ));
@@ -492,9 +469,7 @@ private void initImportButton() {
492469
493470 errorDialog .showAndWait ();
494471 }
495-
496472 });
497-
498473 }
499474
500475 private void initExportButton () {
@@ -605,9 +580,9 @@ private void showLicense(final Licenses license) {
605580 alert .show ();
606581 }
607582 }
583+
608584 private void handleApiOff () {
609585 setWebApplicationType ("none" );
610- System .out .println ("API ist ausgeschaltet" );
611586 }
612587
613588 private void handleApiOn () {
@@ -616,9 +591,8 @@ private void handleApiOn() {
616591
617592 createAndSaveUser (username , password );
618593
619- System . out . println ( "API ist eingeschaltet und Benutzer erstellt." );
594+ propertyWrite ( "server.port" , authPort . getText () );
620595 setWebApplicationType ("" );
621- propertyWrite ("server.port" ,authPort .getText ());
622596 }
623597
624598 private void setWebApplicationType (String value ) {
0 commit comments