Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
spring、junit jar からの注釈があります。1 つの注釈がクラス変数のみに適用されることを確認するにはどうすればよいですか?
javadoc を確認してください。例:注釈@RunWithが@Target(value=TYPE)あるため、型にのみ適用されます。@Testアノテーションが@Target(value=METHOD)あるため、メソッドにのみ適用されます。
@RunWith
@Target(value=TYPE)
@Test
@Target(value=METHOD)