From 9b81b1fb25b256bbc2406d1c4f1d031e8ea8ccde Mon Sep 17 00:00:00 2001 From: Kazuki Shimizu Date: Sun, 16 Dec 2018 11:30:54 +0900 Subject: [PATCH] Remove unnecessary annotation on MyBatis mapper interface --- .../infrastructure/mybatis/mapper/ArticleFavoriteMapper.java | 2 -- .../io/spring/infrastructure/mybatis/mapper/ArticleMapper.java | 2 -- .../io/spring/infrastructure/mybatis/mapper/CommentMapper.java | 2 -- .../io/spring/infrastructure/mybatis/mapper/UserMapper.java | 2 -- .../mybatis/readservice/ArticleFavoritesReadService.java | 2 -- .../infrastructure/mybatis/readservice/ArticleReadService.java | 2 -- .../infrastructure/mybatis/readservice/CommentReadService.java | 2 -- .../infrastructure/mybatis/readservice/TagReadService.java | 2 -- .../infrastructure/mybatis/readservice/UserReadService.java | 2 -- .../mybatis/readservice/UserRelationshipQueryService.java | 2 -- 10 files changed, 20 deletions(-) diff --git a/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleFavoriteMapper.java b/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleFavoriteMapper.java index 5fdaaeb..f8a194a 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleFavoriteMapper.java +++ b/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleFavoriteMapper.java @@ -3,10 +3,8 @@ package io.spring.infrastructure.mybatis.mapper; import io.spring.core.favorite.ArticleFavorite; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; @Mapper -@Component public interface ArticleFavoriteMapper { ArticleFavorite find(@Param("articleId") String articleId, @Param("userId") String userId); diff --git a/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleMapper.java b/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleMapper.java index 9392d37..9005e23 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleMapper.java +++ b/src/main/java/io/spring/infrastructure/mybatis/mapper/ArticleMapper.java @@ -4,9 +4,7 @@ import io.spring.core.article.Article; import io.spring.core.article.Tag; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; -@Component @Mapper public interface ArticleMapper { void insert(@Param("article") Article article); diff --git a/src/main/java/io/spring/infrastructure/mybatis/mapper/CommentMapper.java b/src/main/java/io/spring/infrastructure/mybatis/mapper/CommentMapper.java index a3b906e..28cb90b 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/mapper/CommentMapper.java +++ b/src/main/java/io/spring/infrastructure/mybatis/mapper/CommentMapper.java @@ -3,9 +3,7 @@ package io.spring.infrastructure.mybatis.mapper; import io.spring.core.comment.Comment; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; -@Component @Mapper public interface CommentMapper { void insert(@Param("comment") Comment comment); diff --git a/src/main/java/io/spring/infrastructure/mybatis/mapper/UserMapper.java b/src/main/java/io/spring/infrastructure/mybatis/mapper/UserMapper.java index 2f6505e..6c40551 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/mapper/UserMapper.java +++ b/src/main/java/io/spring/infrastructure/mybatis/mapper/UserMapper.java @@ -4,9 +4,7 @@ import io.spring.core.user.FollowRelation; import io.spring.core.user.User; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; -@Component @Mapper public interface UserMapper { void insert(@Param("user") User user); diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleFavoritesReadService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleFavoritesReadService.java index 76333e3..d812000 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleFavoritesReadService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleFavoritesReadService.java @@ -4,13 +4,11 @@ import io.spring.application.data.ArticleFavoriteCount; import io.spring.core.user.User; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; import java.util.List; import java.util.Set; @Mapper -@Component public interface ArticleFavoritesReadService { boolean isUserFavorite(@Param("userId") String userId, @Param("articleId") String articleId); diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleReadService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleReadService.java index d082de4..09dd572 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleReadService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/ArticleReadService.java @@ -4,11 +4,9 @@ import io.spring.application.Page; import io.spring.application.data.ArticleData; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; import java.util.List; -@Component @Mapper public interface ArticleReadService { ArticleData findById(@Param("id") String id); diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/CommentReadService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/CommentReadService.java index d9fe01d..50c96a9 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/CommentReadService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/CommentReadService.java @@ -3,11 +3,9 @@ package io.spring.infrastructure.mybatis.readservice; import io.spring.application.data.CommentData; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; import java.util.List; -@Component @Mapper public interface CommentReadService { CommentData findById(@Param("id") String id); diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/TagReadService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/TagReadService.java index a098918..f924b7a 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/TagReadService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/TagReadService.java @@ -1,11 +1,9 @@ package io.spring.infrastructure.mybatis.readservice; import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Component; import java.util.List; -@Component @Mapper public interface TagReadService { List all(); diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/UserReadService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/UserReadService.java index c870ea4..dd76334 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/UserReadService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/UserReadService.java @@ -3,9 +3,7 @@ package io.spring.infrastructure.mybatis.readservice; import io.spring.application.data.UserData; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; -@Component @Mapper public interface UserReadService { diff --git a/src/main/java/io/spring/infrastructure/mybatis/readservice/UserRelationshipQueryService.java b/src/main/java/io/spring/infrastructure/mybatis/readservice/UserRelationshipQueryService.java index 4a22380..0e1d510 100644 --- a/src/main/java/io/spring/infrastructure/mybatis/readservice/UserRelationshipQueryService.java +++ b/src/main/java/io/spring/infrastructure/mybatis/readservice/UserRelationshipQueryService.java @@ -2,12 +2,10 @@ package io.spring.infrastructure.mybatis.readservice; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Component; import java.util.List; import java.util.Set; -@Component @Mapper public interface UserRelationshipQueryService { boolean isUserFollowing(@Param("userId") String userId, @Param("anotherUserId") String anotherUserId);