How can you escape the @ character in javadoc?

前端 未结 5 1159
后悔当初
后悔当初 2020-12-02 08:54

How can I escape the @ symbol in javadoc? I am trying to use it inside a {@code} tag, which is inside

 tags.

I alre

5条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 09:43

    my solution is

    /**
     * Mapper Test Helper.
     *
     * add the following annotations above the class
     * 
    {@code
     * // junit5
     * @literal @ExtendWith(SpringExtension.class)
     * // junit4
     * @literal @RunWith(SpringRunner.class)
     * }
    */

提交回复
热议问题