Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
d61c3d42
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
d61c3d42
编写于
2月 25, 2019
作者:
S
Sam Brannen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improve Javadoc and exception message for LTW classes
上级
8dc82b96
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
14 deletion
+17
-14
spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
...amework/context/weaving/DefaultContextLoadTimeWeaver.java
+7
-6
spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
...nstrument/classloading/InstrumentationLoadTimeWeaver.java
+10
-8
未找到文件。
spring-context/src/main/java/org/springframework/context/weaving/DefaultContextLoadTimeWeaver.java
浏览文件 @
d61c3d42
/*
* Copyright 2002-201
8
the original author or authors.
* Copyright 2002-201
9
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"
);
}
}
}
...
...
spring-context/src/main/java/org/springframework/instrument/classloading/InstrumentationLoadTimeWeaver.java
浏览文件 @
d61c3d42
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
9
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 — 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录