LoginSignup
7
2

More than 3 years have passed since last update.

Spring Boot > Spring メモ

Posted at

Spring初学者が最初に知るべき責務とレイヤー

以下を抑えておけばよさそう

Controller

@RestController()
@Controller()

Service

@Service()

Repository

@Repository()

AOP

AOPはアスペクト指向プログラミングの略称で、横断的関心事(共通的なロギング、例外ハンドリング、メッセージの加工等)を一元的に記述できるようにします。
AOPを使用することで、サービスやリポジトリーから、煩雑で共通的な手続きを追い出すことができ、各レイヤーの責務に集中して開発できるようになります。

@Aspect()
@ControllerAdvice()
@RestControllerAdvice()

Configuration

コンフィグレーションは、DIコンテナに登録されるBeanオブジェクトを構成、定義します。

@Configuration()

7
2
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
7
2