fix html
This commit is contained in:
@ -2,6 +2,8 @@ package mops.gruppen2.controllers;
|
||||
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
|
||||
import mops.gruppen2.entities.Gruppe;
|
||||
import mops.gruppen2.entities.GruppeRepository;
|
||||
import mops.gruppen2.entities.Teilnehmer;
|
||||
import mops.gruppen2.security.Account;
|
||||
import org.keycloak.KeycloakPrincipal;
|
||||
@ -47,8 +49,8 @@ public class Gruppen2Controller {
|
||||
}
|
||||
|
||||
@PostMapping("/")
|
||||
public String addTeilnehmer(@ModelAttribute Teilnehmer teilnehmer) {
|
||||
System.out.println(teilnehmer);
|
||||
public String addGruppe(@ModelAttribute Gruppe gruppe) {
|
||||
System.out.println(gruppe);
|
||||
return "redirect:/";
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,10 +6,16 @@ import org.springframework.data.annotation.Id;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
||||
public class Gruppe {
|
||||
@Id
|
||||
Long id;
|
||||
String titel;
|
||||
String beschreibung;
|
||||
List<Teilnehmer> teilnehmersList;
|
||||
|
||||
public Gruppe (String titel, String beschreibung){
|
||||
this.titel = titel;
|
||||
this.beschreibung = beschreibung;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package mops.gruppen2.entities;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface GruppeRepository extends CrudRepository<Gruppe,Long> {
|
||||
}
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
package mops.gruppen2.entities;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
||||
public interface TeilnehmerRepository extends CrudRepository<Teilnehmer,Long> {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user