2525import java .sql .SQLException ;
2626import java .util .Comparator ;
2727import java .util .HashMap ;
28+ import java .util .List ;
2829import java .util .Map ;
2930import java .util .Properties ;
3031
6364import javafx .stage .FileChooser .ExtensionFilter ;
6465import javafx .stage .Stage ;
6566
67+ import javax .print .attribute .standard .PrinterURI ;
68+
6669@ Component
6770public class SettingsController {
6871
@@ -212,17 +215,27 @@ public class SettingsController {
212215 @ FXML
213216 private Label labelUsername ;
214217
215- User user = new User () ;
218+ User user ;
216219
217220 @ Autowired
218221 ViewController mainscreen ;
219222
220223 @ Autowired
221224 public SettingsController (final Model model , final Controller controller ,
222- ApplicationProperties applicationProperties ) {
225+ ApplicationProperties applicationProperties , final UserRepository userRepository ) {
223226 this .model = model ;
224227 this .controller = controller ;
225228 this .applicationProperties = applicationProperties ;
229+ this .userRepository = userRepository ;
230+ this .YYY ();
231+
232+ }
233+
234+ private void YYY () {
235+ final List <User > users = userRepository .findAll ();
236+ if (!users .isEmpty ()) {
237+ user = users .get (0 );
238+ }
226239 }
227240
228241 @ FXML
@@ -267,9 +280,7 @@ private void initialize() {
267280 radioApiOn .setSelected (true );
268281 radioApiOff .setSelected (false );
269282 String port = properties .getProperty ("server.port" );
270- // String username = properties.getProperty(user.getUserName());
271- // System.err.println("'"+user.getUserName()+"'");
272- String username = properties .getProperty ("authUsername" );
283+ authName .setText (user .getUserName ());
273284 if (port != null ) {
274285 authPort .setText (port );
275286 }
@@ -285,7 +296,6 @@ private void initialize() {
285296 e .printStackTrace ();
286297 }
287298
288-
289299 LOG .debug ("saveButton.setOnAction" );
290300
291301 saveButton .setOnAction (ae -> {
@@ -602,8 +612,16 @@ public ObservableList<LicenseTableRow> loadLicenseRows() {
602612 licenseRows .add (new LicenseTableRow ("h2" , Licenses .EPLV1 ));
603613 licenseRows .add (new LicenseTableRow ("Font Awesome Icons" , Licenses .CC_4_0 ));
604614 licenseRows .add (new LicenseTableRow ("mapstruct" , Licenses .APACHEV2 ));
615+ licenseRows .add (new LicenseTableRow ("mapstruct-processor" , Licenses .APACHEV2 ));
605616 licenseRows .add (new LicenseTableRow ("jackson-databind" , Licenses .APACHEV2 ));
606617 licenseRows .add (new LicenseTableRow ("javax.xml.bind" , Licenses .APACHEV2 ));
618+ licenseRows .add (new LicenseTableRow ("spring-boot-starter-web" , Licenses .APACHEV2 ));//gleich
619+ licenseRows .add (new LicenseTableRow ("spring-boot-starter-validation" , Licenses .APACHEV2 ));//gleich
620+ licenseRows .add (new LicenseTableRow ("spring-boot-starter-security" , Licenses .APACHEV2 ));//gleich
621+ // licenseRows.add(new LicenseTableRow("org.springframework.boot", Licenses.APACHEV2));
622+ // licenseRows.add(new LicenseTableRow("jaxb-api", Licenses.);//CDDL 1.1
623+ licenseRows .add (new LicenseTableRow ("jacoco-maven-plugin" , Licenses .EPLV1 ));//EPL 2.0
624+ licenseRows .add (new LicenseTableRow ("maven-compiler-plugin" , Licenses .APACHEV2 ));
607625
608626 licenseRows .sort (Comparator .comparing (LicenseTableRow ::getName ));
609627
0 commit comments