【发布时间】:2014-07-14 11:51:12
【问题描述】:
是否可以将代码 sn-p 放在参数的 JavaDoc 中?我尝试了以下方法,但生成的文档中的代码 sn-p 没有这样格式化。
/**
* Description of method
*
* @param dataSourceProperties defines the properties of this datasource. At a minimum, the following should
* be provided
*
* <pre>
* {@code
* String driverClassName = 'com.mysql.jdbc.Driver';
* String url = 'jdbc:mysql://localhost/example';
* String username = 'root';
* String password = 'password';
* }
* </pre>
*/
【问题讨论】:
-
您的代码无法编译,添加一个“;”到行尾
-
我不确定这里的问题是什么,至少在 Eclipse 工具提示中代码对我来说看起来不错。你在期待什么?