よわよわエンジニアの学習記録

エンジニアになってからの学びを残しておきます。間違い等ございましたら、指摘していただけると泣いて喜びます!笑

【Spring】 java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' 対策方法

AOPの実装時のエラー

AOP実装時にCaused by: java.lang.IllegalArgumentException: Pointcut is not well-formed: expecting 'name pattern' というエラーが発生しました。

 

原因

誤字脱字①

修正前:"execution(*com.example.demo.login.controller.LoginController.getLogin(..))"

修正後:"execution(* com.example.demo.login.controller.LoginController.getLogin(..))"

 

誤字脱字➁

修正前:"execution(* * .. * . * Controller.* (..))"

修正後:"execution(* *..*.*Controller.*(..))"

 

スペースの抜けが原因でした、、

スペースの抜けのエラーはよくあるのでよく確認しようと思います。