This is the API Background where our frontend framework (= VueJS) sends request to.
- git clone https://github.com/xJHamster/BackendSpring
- open maven spring project in your IDE
- create mysql database called "springserver"
- run ProjectWebsiteApplication
You can apply some changes in settings.properties, but be careful! You might need to reinstall your database!
- vor();
- linksUm();
- nimm();
- gib();
- vornFrei();
- kornDa();
- maulLeer();
Standard user to log in with admin rights:
username: admin
password: admin
Should be changed when publishing it!
- user:
{
username: (String),
password: (String),
email: (String)
} - hamster:
{
programName: (String),
program: (String),
terrainName: (String),
laenge: (int),
breite: (int),
x: (int),
y: (int),
cornAnzahl: (int[])
corn: (int[][]) wall: (int[][])
}
All Services starts with /api!
- /user services - available from DEV This are all Services which involves user data beginning with /user (services in brackets are coming soon!)
- /users (GET, POST, PUT, DELETE)
- /logout (GET)
- /roles (POST, DELETE)
- /hamster services - for all registered user available: All services which handles requests containing hamstercode beginning with /hamster
- /defaultTerrain (POST)
- /existingTerrain (POST)
- /newTerrain (POST)
- Teacher services - available from TEACHER Services which are available for teachers to take control over their students begin with /teacher
- /students (GET)
- /course (GET, POST, DELETE)
- /course/students (GET, POST, DELETE)
- /course/teachers (GET)
- /exercises (GET, DELETE, POST, PUT)
- (/rateExercises)
- /login service
The login service; request sent as json => {"username": "username", "password": "password"} - /register service
The register service; request sent as json => {"username": "username", "password": "password", "email": "email"}
To check if you installed everything correctly, I provided you with JUnit tests, which you can find in src/test/java/io/github/Hattinger04/