storm topology all in one spring文件合并
public class MergeMetaInf {public static void main(String[] args) throws IOException, URISyntaxException {File metaInfDir = new File("src/main/resources");ClassLoader classLoader = Thread.currentThread().getContextClassLoader();for (String name : new String[] {"META-INF/spring.factories", "META-INF/spring.handlers", "META-INF/spring.schemas", "META-INF/spring.tooling"}) {File file = new File(metaInfDir, name);if (!file.getParentFile().exists()) file.getParentFile().mkdirs();try (OutputStream out = new FileOutputStream(file)) {for (Enumeration<URL> iter = classLoader.getResources(name); iter.hasMoreElements();) {URL url = iter.nextElement();if (!url.getProtocol().equals("file")) {UtilIO.write(url.openStream(), out);out.write('\n');}}}}}}
?