File tree Expand file tree Collapse file tree
microsphere-java-core/src/main/java/io/microsphere/classloading Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3434 * <li>version : Artifact Maven version</li>
3535 * </ul>
3636 *
37+ * <h3>Example Usage</h3>
38+ * <pre>{@code
39+ * // Create a default instance and execute to remove banned artifacts from classpath
40+ * BannedArtifactClassLoadingExecutor executor = new BannedArtifactClassLoadingExecutor();
41+ * executor.execute();
42+ * }</pre>
43+ *
44+ * <p>This will load all the banned artifact definitions from "META-INF/banned-artifacts"
45+ * resources in the current classloader, detect all non-JDK artifacts in the classpath,
46+ * and remove URLs corresponding to any matched banned artifacts.</p>
47+ *
48+ * <p>You can also provide a custom {@link ClassLoader} if you want to inspect a specific one:</p>
49+ *
50+ * <pre>{@code
51+ * ClassLoader customClassLoader = ...; // your custom class loader
52+ * BannedArtifactClassLoadingExecutor executor = new BannedArtifactClassLoadingExecutor(customClassLoader);
53+ * executor.execute();
54+ * }</pre>
55+ *
3756 * @author <a href="mailto:mercyblitz@gmail.com">Mercy<a/>
57+ * @see ArtifactDetector
58+ * @see MavenArtifact
59+ * @see Artifact
3860 * @since 1.0.0
3961 */
4062public class BannedArtifactClassLoadingExecutor {
You can’t perform that action at this time.
0 commit comments