spring_reference/VIII. Build tool plugins/60.3. Finding a main class.md

4 lines
318 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 60.3. 查找main类
如果你没有使用`Repackager.setMainClass()`指定一个main类该repackager将使用[ASM](http://asm.ow2.org/)去读取class文件然后尝试查找一个合适的具有`public static void main(String[] args)`方法的类。如果发现多个候选者,将会抛出异常。