3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[エラー] [Spring security]There was an unexpected error (type=Forbidden, status=403). Forbidden

Posted at

#起きたこと
Spring-securityを利用して認証機能を実装。
ログイン処理成功後、検索フォームのsubmitを押下した際に表題のエラーが発生。

#原因

<form action="/find">

Thymleafでtemplateを作成していたが、検索フォームのアクションの指定を

<form th:action="@{/find}">

に変更することで遷移可能となった。

#終わりに
権限が無いってエラーだったのでconfigやController、Serviceを中心にデバッグしてたけどまさかのHTML内での出来事だったと・・・
なかなか気がつけなかったので備忘録として

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?