Menu -> "Tools" -> "Options.." -> Select "Java" as "Option Category:" -> Tick "Generate codes even when there is no profile" as "Option Item:" -> Click "Ok"
它“指定即使在项目中未加载Java配置文件时是否生成代码(不推荐)。”
现在可以生成java代码。