Skip to content
Snippets Groups Projects
Commit 06ad9fd6 authored by Izzdin Ahmad's avatar Izzdin Ahmad
Browse files

lokal

parent 2d9a73c7
No related branches found
No related tags found
1 merge request!1Master izzo
...@@ -115,9 +115,15 @@ public class Demo1Application { ...@@ -115,9 +115,15 @@ public class Demo1Application {
@GetMapping("/{cityID}") @GetMapping("/{cityID}")
public City readCity(@PathVariable Long cityID, HttpServletRequest anfrageInfos, Principal benutzer){ public City readCity(@PathVariable Long cityID, HttpServletRequest anfrageInfos, Principal benutzer){
Optional<City> city = cityRepositoryy.findById(cityID); Optional<City> city = cityRepositoryy.findById(cityID);
//System.out.println( "Anfrageinformationen : " + anfrageInfos.getRemoteUser() + ", " + anfrageInfos.getRemoteHost()+ System.out.println( "Anfrageinformationen : " + anfrageInfos.getRemoteUser() + ", " + anfrageInfos.getRemoteHost()+
// ", "+ anfrageInfos.getRemoteAddr()+ ", "+ anfrageInfos.getRemotePort()); ", "+ anfrageInfos.getRemoteAddr()+ ", "+ anfrageInfos.getRemotePort());
//System.out.println("Benutzername: "+ benutzer.getName()); //der Benutzer ist hier nicht authentifiziert, soll über eventuell über @EnableWebSecurity konfiguriert werden. //System.out.println("Benutzername: "+ benutzer.getName()); //der Benutzer ist hier nicht authentifiziert, soll über eventuell über @EnableWebSecurity konfiguriert werden.
//im Falle, das der Benutzer selber Seine Daten in dem Browser eingibt.
if (anfrageInfos != null){
System.out.print("Anfrage von -> " + anfrageInfos.getParameter("name"));
System.out.println(" " + anfrageInfos.getParameter("alter"));
}
if(city.isPresent()){ if(city.isPresent()){
return city.get(); return city.get();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment