Improve Javadoc and exception message for LTW classes
This commit is contained in:
parent
8dc82b9689
commit
d61c3d429c
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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,
|
* Default {@link LoadTimeWeaver} bean for use in an application context,
|
||||||
* decorating an automatically detected internal {@code LoadTimeWeaver}.
|
* decorating an automatically detected internal {@code LoadTimeWeaver}.
|
||||||
*
|
*
|
||||||
* <p>Typically registered for the default bean name
|
* <p>Typically registered for the default bean name "{@code loadTimeWeaver}";
|
||||||
* "{@code loadTimeWeaver}"; the most convenient way to achieve this is
|
* the most convenient way to achieve this is Spring's
|
||||||
* Spring's {@code <context:load-time-weaver>} XML tag.
|
* {@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
|
* <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+,
|
* Oracle WebLogic 10+, GlassFish 4+, Tomcat 8+, WildFly 8+, IBM WebSphere 8.5+,
|
||||||
* {@link InstrumentationSavingAgent Spring's VM agent}, and any {@link ClassLoader}
|
* {@link InstrumentationSavingAgent Spring's VM agent}, and any {@link ClassLoader}
|
||||||
* supported by Spring's {@link ReflectiveLoadTimeWeaver} (such as Liberty's).
|
* supported by Spring's {@link ReflectiveLoadTimeWeaver} (such as Liberty's).
|
||||||
|
@ -95,7 +96,7 @@ public class DefaultContextLoadTimeWeaver implements LoadTimeWeaver, BeanClassLo
|
||||||
}
|
}
|
||||||
catch (IllegalStateException ex) {
|
catch (IllegalStateException ex) {
|
||||||
throw new IllegalStateException(ex.getMessage() + " Specify a custom LoadTimeWeaver or start your " +
|
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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* 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");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with 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}.
|
* {@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 — 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
|
* <p>In Eclipse, for example, add something similar to the following to the
|
||||||
* the {@link InstrumentationSavingAgent} class, as shipped with Spring.
|
* 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>-javaagent:${project_loc}/lib/spring-instrument-{version}.jar</code>
|
||||||
*
|
|
||||||
* <p><code class="code">-javaagent:${project_loc}/lib/org.springframework.instrument.jar</code>
|
|
||||||
*
|
*
|
||||||
* @author Rod Johnson
|
* @author Rod Johnson
|
||||||
* @author Juergen Hoeller
|
* @author Juergen Hoeller
|
||||||
|
|
Loading…
Reference in New Issue