提交 d61c3d42 编写于 作者: S Sam Brannen

Improve Javadoc and exception message for LTW classes

上级 8dc82b96
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -39,12 +39,13 @@ import org.springframework.util.Assert;
* Default {@link LoadTimeWeaver} bean for use in an application context,
* decorating an automatically detected internal {@code LoadTimeWeaver}.
*
* <p>Typically registered for the default bean name
* "{@code loadTimeWeaver}"; the most convenient way to achieve this is
* Spring's {@code <context:load-time-weaver>} XML tag.
* <p>Typically registered for the default bean name "{@code loadTimeWeaver}";
* the most convenient way to achieve this is Spring's
* {@code <context:load-time-weaver>} XML tag or {@code @EnableLoadTimeWeaving}
* on a {@code @Configuration} class.
*
* <p>This class implements a runtime environment check for obtaining the
* appropriate weaver implementation: As of Spring Framework 5.0, it detects
* appropriate weaver implementation. As of Spring Framework 5.0, it detects
* Oracle WebLogic 10+, GlassFish 4+, Tomcat 8+, WildFly 8+, IBM WebSphere 8.5+,
* {@link InstrumentationSavingAgent Spring's VM agent}, and any {@link ClassLoader}
* supported by Spring's {@link ReflectiveLoadTimeWeaver} (such as Liberty's).
......@@ -95,7 +96,7 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo
}
catch (IllegalStateException ex) {
throw new IllegalStateException(ex.getMessage() + " Specify a custom LoadTimeWeaver or start your " +
"Java virtual machine with Spring's agent: -javaagent:org.springframework.instrument.jar");
"Java virtual machine with Spring's agent: -javaagent:spring-instrument-{version}.jar");
}
}
}
......
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -31,16 +31,18 @@ import org.springframework.util.ClassUtils;
/**
* {@link LoadTimeWeaver} relying on VM {@link Instrumentation}.
*
* <p>Start the JVM specifying the Java agent to be used, like as follows:
* <p>Start the JVM specifying the Java agent to be used &mdash; for example, as
* follows where <code>spring-instrument-{version}.jar</code> is a JAR file
* containing the {@link InstrumentationSavingAgent} class shipped with Spring
* and where <code>{version}</code> is the release version of the Spring
* Framework (e.g., {@code 5.1.5.RELEASE}).
*
* <p><code class="code">-javaagent:path/to/org.springframework.instrument.jar</code>
* <p><code>-javaagent:path/to/spring-instrument-{version}.jar</code>
*
* <p>where {@code org.springframework.instrument.jar} is a JAR file containing
* the {@link InstrumentationSavingAgent} class, as shipped with Spring.
* <p>In Eclipse, for example, add something similar to the following to the
* JVM arguments for the Eclipse "Run configuration":
*
* <p>In Eclipse, for example, set the "Run configuration"'s JVM args to be of the form:
*
* <p><code class="code">-javaagent:${project_loc}/lib/org.springframework.instrument.jar</code>
* <p><code>-javaagent:${project_loc}/lib/spring-instrument-{version}.jar</code>
*
* @author Rod Johnson
* @author Juergen Hoeller
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册