zwischenschritt
This commit is contained in:
parent
2a3ac1498b
commit
042c78e0d4
5
pom.xml
5
pom.xml
@ -38,6 +38,11 @@
|
||||
<version>${junit.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
package RestAPISchnittstelle;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.http.HttpClient;
|
||||
import java.net.http.HttpRequest;
|
||||
@ -25,8 +27,7 @@ public class RestApiClient implements IRestAPI{
|
||||
|
||||
|
||||
public static void main(String[] args){
|
||||
|
||||
new RestApiClient().get("Kind", 2);
|
||||
new RestApiClient().post("Benutzerkonto", "{\"name\":\"Sven\", \"email\":\"svenmail\", \"passwort\":\"5678765\", \"rid\":\"0\"}");
|
||||
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.VBox;
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@ -127,6 +128,10 @@ public class AccounterstellungMitarbeiter {
|
||||
|
||||
String json = String.format("{\"name\":\"%s\", \"email\":\"%s\", \"passwort\":\"%d\", \"rid\":\"%d\"}",
|
||||
accountname.getText(), email.getText(), einmalpw.getText().hashCode(), (typMitarbeiter.isSelected() ? 0:1));
|
||||
|
||||
//Gson gson = new Gson();
|
||||
//String jay = gson.toJson(this);
|
||||
|
||||
System.out.println(json);
|
||||
RestApiClient api = new RestApiClient();
|
||||
api.post("Benutzerkonto", json);
|
||||
|
@ -41,7 +41,9 @@ public class EssensverwaltungMitarbeiterView {
|
||||
}
|
||||
|
||||
public void onFilter(ActionEvent actionEvent) {
|
||||
VerwaltungApplication.sceneWechseln(new Stage(), 600, 400, "inhaltsstoffe_filtern-view.fxml");
|
||||
Stage stage = new Stage();
|
||||
VerwaltungApplication.sceneWechseln(stage, 450, 400, "inhaltsstoffe_filtern-view.fxml");
|
||||
|
||||
}
|
||||
|
||||
public void onHinzufuegen(ActionEvent actionEvent) {
|
||||
|
@ -2,6 +2,7 @@ module de.subway_surfers.vpr_app {
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
requires java.net.http;
|
||||
requires com.google.gson;
|
||||
|
||||
|
||||
opens de.subway_surfers.vpr_app to javafx.fxml;
|
||||
|
Loading…
Reference in New Issue
Block a user