type in this to test for number of leap years between 2000 and 2024: localhost:8085/api/calendar/numberOfLeapYears/2000/2024
having trouble running Main.java (fixed)
rm volumes/sqlite.db - remove sqlite.db
dependency problem
take out version line
port is already used (fixed!!)
change port number from 8085 to 8089 in application.properties
Debugging
set a break point
didn't execute code at and after the breakpoint
only execute the toString method, didn't print out height, age, and weight
Hacks
[x] Build tester method (public static void main) for Person Pojo. Test zero argument and all argument constructor.
[x] Build toString method to display attributes of the class.
Output
[x] Build other attributes into POJO that where mentioned in project dialog at the beginning of this blog. Add 1 or more APIs. Use Issues to plan and track work.
Person.java
PersonApiController.java
[ ] Correct the BUG in setStats! Currently, it won't let you do more than one date.
Setting stats using Body raw and JSON using POST.
Test RESTController
Adding record using Params and POST.
Listing records using GET.
be careful of not putting an extra period in the key
Listing records using GET.
Searching records using Body raw and JSON using POST. This is preferred method to secure transmission
Delete record using DELETE.
Setting stats using Body raw and JSON using POST. This again is preferred method to secure transmission
(didn't complete from FRQ1)
Making endpoint for numberOfLeapYears method
Testing using Postman
Debugging
Hacks
[x] Build tester method (public static void main) for Person Pojo. Test zero argument and all argument constructor.
[x] Build toString method to display attributes of the class.
Output
Person.java
PersonApiController.java
Test RESTController
Adding record using Params and POST.
Listing records using GET.
Listing records using GET.
Searching records using Body raw and JSON using POST. This is preferred method to secure transmission
Delete record using DELETE.
Setting stats using Body raw and JSON using POST. This again is preferred method to secure transmission