The annotation means that the method will be run in a new transaction.
此标注意味着,该方法将在新事务中运行。
If a method is 10 lines long and 8 lines of the method were exercised in a test run, then the method has a line coverage of 80%.
如果一个方法有10行代码,其中的8行在测试中被执行,那么这个方法的行覆盖率是80%。
You'll find the first problem if you try to run this in a standard main method.
如果您试图在一个标准的main方法中运行这段代码,就会发现第一个问题。
应用推荐