Files
springboot-demo/target/classes/com/example/demo/controller/LearnController.class

14 lines
5.7 KiB
Plaintext
Raw Normal View History

<EFBFBD><EFBFBD><EFBFBD><EFBFBD>=<00>
 java/lang/Object<init>()Vjava/util/HashMap
 message .Welcome to the Spring Boot learning workspace.   java/util/Mapput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;homePage/userLab /users.htmlaopLab /aop.html!eventLab# /events.html%learnApi'/learn)app +,- ./+com/example/demo/controller/LearnControllerappNameLjava/lang/String;1EUse this endpoint family to compare common Spring MVC input patterns.3 learningGoals5java/lang/String7^Understand how query parameters, path variables, headers, cookies, and JSON bodies are mapped.91Compare normal responses with handled exceptions.;MConnect the browser, controller method signature, and serialized JSON output.= endpoints?#GET /learn/params?name=alex&age=18APOST /learn/bodyCGET /learn/path/{id}EGET /learn/headerGGET /learn/cookieIGET /learn/exceptionKPOST /api/auth/loginMGET /api/secure/meOpatternQ @RequestParamSnameUageWtipYJQuery parameters are useful for filters, pagination, and optional toggles.[ @RequestBody]received_PJSON request bodies fit create and update flows where the payload has structure.a @PathVariablecideUPath variables usually identify a concrete resource such as a user, order, or lesson.g@RequestHeaderi userAgentkCHeaders often carry auth context, tracing ids, and client metadata.m @CookieValueo sessionIdqTCookies help explain browser session state and why a request may look authenticated.sjava/lang/RuntimeExceptionu0Intentional demo exception from /learn/exception
rw x(Ljava/lang/String;)Vz@ExceptionHandler|error
r~ <00>
getMessage()Ljava/lang/String;<00>`Spring can convert thrown exceptions into structured API responses without leaking stack traces.RuntimeVisibleAnnotations4Lorg/springframework/beans/factory/annotation/Value;value${spring.application.name:demo}CodeLineNumberTableLocalVariableTablethis-Lcom/example/demo/controller/LearnController;root()Ljava/util/Map;infoLjava/util/Map;LocalVariableTypeTable5Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>; Signature7()Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;4Lorg/springframework/web/bind/annotation/GetMapping; /learn/rootparams6(Ljava/lang/String;Ljava/lang/Integer;)Ljava/util/Map;Ljava/lang/Integer;resultMethodParameters\(Ljava/lang/String;Ljava/lang/Integer;)Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>; /learn/params"RuntimeVisibleParameterAnnotations6Lorg/springframework/web/bind/annotation/RequestParam;required defaultValueguest0body (Ljava/util/Map;)Ljava/util/Map;datal(Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;)Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;5Lorg/springframework/web/bind/annotation/PostMapping; /learn/body5Lorg/springframework/web/bind/annotation/RequestBody;path#(Ljava/lang/String;)Ljava/util/Map;I(Ljava/lang/String;)Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;/learn/path/{id}6Lorg/springframework/web/bind/annotation/PathVariable;header /learn/header7Lorg/springframework/web/bind/annotation/RequestHeader;
User-Agentcookie /learn/cookie5Lorg/springframework/web/bind/annotation/CookieValue;
JSESSIONID exception/learn/exceptionhandleException-(Ljava/lang/RuntimeException;)Ljava/util/Map;eLjava/lang/RuntimeException;S(Ljava/lang/RuntimeException;)Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;:Lorg/springframework/web/bind/annotation/ExceptionHandler;
SourceFileLearnController.java8Lorg/springframework/web/bind/annotation/RestController;!+./<00> <00><00>s<00>
<00>/*<2A><01><00><00> <00><00><00><00><00><00>L<>Y<> L+
 <0C>W+<16>W+<1A>W+<1E>W+ "<22>W+$&<26>W+<2B><00>")4?J <00>L<00><00>D<00><00><00> D<00><00><00><00><00><00><00>[s<00><00><00><00><00>v<>Y<> L+(*<2A>*<2A>W+
0<>W+2<06>4Y6SY8SY:S<>W+<<08>4Y>SY@SYBSYDSYFSYHSYJSYLS<4C>W+<2B><00>%&' (<-t7<00>v<00><00>n<00><00><00> n<00><00><00><00><00><00><00>[s'<00><00><00><00>4<>Y<> N-NP<>W-R+<2B>W-T,<2C>W-VX<>W-<2D><00>?@AB'C2D<00>*4<00><00>4S/4U<00>,<00><00><00> ,<00><00><00> SU<00><00><00><00><00>[s<00><00>!<00><00>Z<00><00>s<00><00><00>Z<00><00>s<00><00><00><00><00>*<2A>Y<> M,NZ<>W,\+<2B>W,V^<5E>W,<2C><00>IJKL(M<00> *<00><00>*<00><00>"<00><00><00>*<00><00>"<00><00><00><00><00><00><00><00><00>[s<00><00><00><00><00><00><00>*<2A>Y<> M,N`<60>W,b+<2B>W,Vd<>W,<2C><00>RSTU(V<00> *<00><00>*c/"<00><00><00> "<00><00><00>c<00><00><00><00><00>[s<00><00><00><00><00><00><00>*<2A>Y<> M,Nf<>W,h+<2B>W,Vj<>W,<2C><00>[\]^(_<00> *<00><00>*i/"<00><00><00> "<00><00><00>i<00><00><00><00><00>[s<00><00><00><00>s<00><00>Z<00><00><00><00><00>*<2A>Y<> M,Nl<>W,n+<2B>W,Vp<>W,<2C><00>defg(h<00> *<00><00>*o/"<00><00><00> "<00><00><00>o<00><00><00><00><00>[s<00><00><00><00>s<00><00>Z<00><00><00><00>4
<EFBFBD>rYt<>v<><00>m<00> 
<00><00><00><00><00>[s<00><00><00><00><00>-<2D>Y<> M,Ny<>W,{+<2B>}<7D>W,V<12><>W,<2C><00>rst u+v<00> -<00><00>-<00><00>%<00><00><00> %<00><00><00><00><00><00><00><00><00>[c<00><00><00><00><00>