Skip to content

COG-1157: UserController + AppointmentController @RequestMapping → @GetMapping/@PostMapping - #330

Open
patrickbradley-cog wants to merge 1 commit into
masterfrom
devin/cog-1157-w1-usercontroller-appointmentcontroller-requestmapping
Open

patrickbradley-cog wants to merge 1 commit into
masterfrom
devin/cog-1157-w1-usercontroller-appointmentcontroller-requestmapping

Conversation

@patrickbradley-cog

@patrickbradley-cog patrickbradley-cog commented Sep 30, 2026 •

Copy link
Copy Markdown

Summary

Linear: COG-1157 — W1 forward-compatible refactor on Boot 1.5.4 (no Boot/Java bump). Annotation-only diff in UserController and AppointmentController:

-@RequestMapping(value = "/profile", method = RequestMethod.GET)   // UserController
+@GetMapping("/profile")
-@RequestMapping(value = "/profile", method = RequestMethod.POST)
+@PostMapping("/profile")
-@RequestMapping(value = "/create", method = RequestMethod.GET)    // AppointmentController
+@GetMapping("/create")
-@RequestMapping(value = "/create", method = RequestMethod.POST)
+@PostMapping("/create")
-import org.springframework.web.bind.annotation.RequestMethod;
+import ...GetMapping; import ...PostMapping;
  • Class-level @RequestMapping("/user") / @RequestMapping("/appointment") prefixes are kept (so the RequestMapping import stays).
  • No method-less mappings exist in these two controllers — all four handlers already declared GET/POST, so nothing was narrowed. (Callers confirmed anyway: profile.html posts to /user/profile, appointment.html posts to /appointment/create, header.html links GET to both.)
  • AppointmentController SimpleDateFormat("yyyy-MM-dd hh:mm").parse(date) block left untouched (owned by the W5 LocalDateTime ticket).
  • Note: ticket acceptance says signup goes through these controllers — it actually goes through HomeController (/signup), which belongs to the sibling controller ticket. The appointment-create and profile flows are the ones exercised here.

Merge order: should merge behind the W0 smoke suite (COG-1141 harness, PRs #106/#108/#109) once that's green. Not merged by this session.

Verification

JDK: Temurin 8 (1.8.0), MySQL 5.7 in Docker (onlinebanking db, repo's default creds). Modern JDK 8 disables TLSv1/1.1, which breaks Connector/J 5.1's default SSL handshake with MySQL 5.7, so the datasource URL was overridden with ?useSSL=false on the command line only — no repo config changed.

$ mvn -B -f UserFront/pom.xml verify '-Dspring.datasource.url=jdbc:mysql://localhost:3306/onlinebanking?useSSL=false'
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0   (UserFrontApplicationTests.contextLoads)
BUILD SUCCESS

Handler mappings registered at startup are unchanged in shape:

Mapped "{[/appointment/create],methods=[POST]}"
Mapped "{[/appointment/create],methods=[GET]}"
Mapped "{[/user/profile],methods=[POST]}"
Mapped "{[/user/profile],methods=[GET]}"

Ran the jar against MySQL and exercised the flows with curl (fresh DB needs the role seed rows — pre-existing requirement, unrelated to this change):

# seed: insert into role(role_id,name) values (0,ROLE_USER),(1,ROLE_ADMIN)
$ POST /signup  (HomeController)
302 -> http://localhost:8080/
$ POST /index  (form login)
302 -> http://localhost:8080/userFront
$ GET /user/profile  (@GetMapping)
200
value="t1157@[REDACTED SECRET].com"
$ POST /user/profile  (@PostMapping; lastName=Updated, phone=5559990000)
200
value="Updated"
$ GET /appointment/create  (@GetMapping)
200
id="appointmentForm"
$ POST /appointment/create  (@PostMapping)
302 -> http://localhost:8080/userFront
$ PUT /appointment/create  (unmapped verb)
405
$ DELETE /user/profile  (unmapped verb)
405
$ SQL
username	last_name	phone
t1157	Updated	5559990000
id	date	location	description	username
1	2026-10-15 10:30:00	Chicago	COG-1157 verify	t1157

Link to Devin session: https://app.devin.ai/sessions/5c6402db48534194839f69d12cefced2
Open in Devin Desktop: https://app.devin.ai/desktop/session/5c6402db48534194839f69d12cefced2?variant=devin
Requested by: @patrickbradley-cog


Devin Review

Status Commit
⚪ Not started —

Run Devin Review

Devin Review (Staging)


Devin Review

…od) -> @GetMapping/@PostMapping

Co-Authored-By: patrick.bradley <patrick.bradley@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant