Posts

Showing posts from December, 2022

Spring Params

By Path Variables Example:  public void pathVariablesExample(@Pathvariable("name") String name) RequestParams: public void paramVariablesExample(@RequestParams(name="firstname" required=true default="user")String name) Encapsulated Parameters Public class ParameterModel{ private String p1;private String p2; } public void paramVariablesExample2(ParameterModel params){ params.p1+""+params.p2 }

Useful curl commands

Command to connect to host with port number: 1. curl -v telnet://127.0.0.1:8000 To capture only response  curl --location --request GET "http://localhost:8000" To capture response and its  statuscode  curl --location --request GET "http://localhost:8000" -w "%{http_code}" To capture response and its status code in a file curl --location --request GET "http://localhost:8000" -w "%{http_code}"

Use full Links

Java- 1.  Java2Blog - A blog on Java, Python and C++ programming languages 2. 15+ Coding Based Java 8 Coding Interview Question - Quescol 3. Armstrong Number in Java | How to Find Armstrong Number? (Examples) (educba.com)