Score
0
Watch 124 Star 365 Fork 102

叶大侠 / JApiDocsJavaApache-2.0

BindingResult 这个参数对象 生成不成功

Open
Alvin  Opened this issue

代码:
/**
* 添加账号信息
* @chancelai securitiesAccount
* @chancelai bindingResult
* @HTTP4O4
*/
@PostMapping("addAccount")
public ResultVo addAccount(@0921 @RequestBody FSecuritiesAccount securitiesAccount, BindingResult bindingResult, HttpServletRequest request) {
String getUnionid = request.getServletContext().getAttribute("unionid")+"";
int result =0;
try {
if (bindingResult.hasErrors()) {
log.error("【获取账号列表】参数不正确,securitiesAccount={},getUnionid={}",securitiesAccount,getUnionid);
return ResultVOUtil.error(bindingResult.getFieldError().getDefaultMessage());
}
if (Objects.isNull(securitiesAccount)) {
return ResultVOUtil.error(ResultEnum.PARAM_IS_NULL.getMessage());
}
securitiesAccount.setUnionid(getUnionid);
。。。。。。
}

报错信息:
2020-07-04 14:41:58,789 - info: we think T should not be an enum type
2020-07-04 14:41:58,796 - warning!! Cannot find java file , in java file : C:\Git\myProject\finance\finance-api\src\main\java\com\example\financeapi\vo\ResultVo.java, className : T, we cannot found more information of it, you've better to make it a JavaBean
2020-07-04 14:41:58,815 - info: we think T should not be an enum type
2020-07-04 14:41:58,821 - warning!! Cannot find java file , in java file : C:\Git\myProject\finance\finance-api\src\main\java\com\example\financeapi\vo\ResultVo.java, className : T, we cannot found more information of it, you've better to make it a JavaBean

io.github.yedaxia.apidocs.exception.JavaFileNotFoundException: Cannot find java file , in java file : C:\Git\myProject\finance\finance-api\src\main\java\com\example\financeapi\controller\FSecuritiesAccountController.java, className : BindingResult

at io.github.yedaxia.apidocs.ParseUtils.searchJavaFile(ParseUtils.java:52)
at io.github.yedaxia.apidocs.ParseUtils.parseClassNodeByType(ParseUtils.java:223)
at io.github.yedaxia.apidocs.parser.SpringControllerParser.lambda$afterHandleMethod$7(SpringControllerParser.java:144)
at java.util.ArrayList.forEach(ArrayList.java:1257)
at com.github.javaparser.ast.NodeList.forEach(NodeList.java:267)
at io.github.yedaxia.apidocs.parser.SpringControllerParser.afterHandleMethod(SpringControllerParser.java:101)
at io.github.yedaxia.apidocs.parser.AbsControllerParser.lambda$parseMethodDocs$7(AbsControllerParser.java:158)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at io.github.yedaxia.apidocs.parser.AbsControllerParser.parseMethodDocs(AbsControllerParser.java:90)
at io.github.yedaxia.apidocs.parser.AbsControllerParser.lambda$parse$0(AbsControllerParser.java:42)
at java.util.Optional.ifPresent(Optional.java:159)
at io.github.yedaxia.apidocs.parser.AbsControllerParser.parse(AbsControllerParser.java:39)
at io.github.yedaxia.apidocs.doc.AbsDocGenerator.initControllerNodes(AbsDocGenerator.java:44)
at io.github.yedaxia.apidocs.doc.AbsDocGenerator.<init>(AbsDocGenerator.java:27)
at io.github.yedaxia.apidocs.doc.HtmlDocGenerator.<init>(HtmlDocGenerator.java:29)
at io.github.yedaxia.apidocs.Docs.buildHtmlDocs(Docs.java:30)
at com.example.financeapi.JApiDocsTest.testToAlias(JApiDocsTest.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
530148 flycatzly 1578926740 total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority