Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
3740380a
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
3740380a
编写于
10月 11, 2010
作者:
J
Juergen Hoeller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
polishing
上级
cb434793
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
26 addition
and
30 deletion
+26
-30
org.springframework.core/src/main/java/org/springframework/core/convert/converter/package-info.java
.../springframework/core/convert/converter/package-info.java
+1
-3
org.springframework.core/src/main/java/org/springframework/core/convert/package-info.java
...n/java/org/springframework/core/convert/package-info.java
+0
-2
org.springframework.core/src/main/java/org/springframework/core/convert/support/package-info.java
...rg/springframework/core/convert/support/package-info.java
+1
-3
org.springframework.jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java
...rk/jms/support/converter/MarshallingMessageConverter.java
+4
-4
org.springframework.web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java
...k/http/converter/xml/MarshallingHttpMessageConverter.java
+20
-18
未找到文件。
org.springframework.core/src/main/java/org/springframework/core/convert/converter/package-info.java
浏览文件 @
3740380a
/**
*
* <p>
* SPI to implement Converters.
* </p>
* SPI to implement Converters for the type conversion system.
*
*/
package
org.springframework.core.convert.converter
;
...
...
org.springframework.core/src/main/java/org/springframework/core/convert/package-info.java
浏览文件 @
3740380a
/**
*
* <p>
* Type conversion system API.
* </p>
*
*/
package
org.springframework.core.convert
;
...
...
org.springframework.core/src/main/java/org/springframework/core/convert/support/package-info.java
浏览文件 @
3740380a
/**
*
* <p>
* TypeConverter system implementation.
* </p>
* Default implementation of the type conversion system.
*
*/
package
org.springframework.core.convert.support
;
...
...
org.springframework.jms/src/main/java/org/springframework/jms/support/converter/MarshallingMessageConverter.java
浏览文件 @
3740380a
/*
* Copyright 2002-20
09
the original author or authors.
* Copyright 2002-20
10
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.
...
...
@@ -76,7 +76,7 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
* {@link Unmarshaller} interface as well
*/
public
MarshallingMessageConverter
(
Marshaller
marshaller
)
{
Assert
.
notNull
(
marshaller
,
"
m
arshaller must not be null"
);
Assert
.
notNull
(
marshaller
,
"
M
arshaller must not be null"
);
if
(!(
marshaller
instanceof
Unmarshaller
))
{
throw
new
IllegalArgumentException
(
"Marshaller ["
+
marshaller
+
"] does not implement the Unmarshaller "
+
...
...
@@ -96,8 +96,8 @@ public class MarshallingMessageConverter implements MessageConverter, Initializi
* @param unmarshaller the Unmarshaller to use
*/
public
MarshallingMessageConverter
(
Marshaller
marshaller
,
Unmarshaller
unmarshaller
)
{
Assert
.
notNull
(
marshaller
,
"
m
arshaller must not be null"
);
Assert
.
notNull
(
unmarshaller
,
"
u
nmarshaller must not be null"
);
Assert
.
notNull
(
marshaller
,
"
M
arshaller must not be null"
);
Assert
.
notNull
(
unmarshaller
,
"
U
nmarshaller must not be null"
);
this
.
marshaller
=
marshaller
;
this
.
unmarshaller
=
unmarshaller
;
}
...
...
org.springframework.web/src/main/java/org/springframework/http/converter/xml/MarshallingHttpMessageConverter.java
浏览文件 @
3740380a
...
...
@@ -31,15 +31,15 @@ import org.springframework.oxm.UnmarshallingFailureException;
import
org.springframework.util.Assert
;
/**
* Implementation of {@link org.springframework.http.converter.HttpMessageConverter HttpMessageConverter}
that can read
* and write XML using Spring's {@link Marshaller} and {@link Unmarshaller} abstractions.
* Implementation of {@link org.springframework.http.converter.HttpMessageConverter HttpMessageConverter}
*
that can read
and write XML using Spring's {@link Marshaller} and {@link Unmarshaller} abstractions.
*
* <p>This converter requires a {@code Marshaller} and {@code Unmarshaller} before it can be used.
These can be injected
*
by the {@linkplain #MarshallingHttpMessageConverter(Marshaller) constructor} or {@linkplain
* #setMarshaller(Marshaller) bean properties}.
* <p>This converter requires a {@code Marshaller} and {@code Unmarshaller} before it can be used.
*
These can be injected by the {@linkplain #MarshallingHttpMessageConverter(Marshaller) constructor}
*
or {@linkplain
#setMarshaller(Marshaller) bean properties}.
*
* <p>By default, this converter supports {@code text/xml} and {@code application/xml}. This can be
overridden by
* setting the {@link #setSupportedMediaTypes(java.util.List) supportedMediaTypes} property.
* <p>By default, this converter supports {@code text/xml} and {@code application/xml}. This can be
*
overridden by
setting the {@link #setSupportedMediaTypes(java.util.List) supportedMediaTypes} property.
*
* @author Arjen Poutsma
* @since 3.0
...
...
@@ -52,22 +52,23 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
/**
* Construct a new {@code MarshallingHttpMessageConverter} with no {@link Marshaller} or
{@link Unmarshaller} set. The
*
marshaller and unmarshaller must be set after construction by invoking {@link #setMarshaller(Marshaller)} and {@link
* #setUnmarshaller(Unmarshaller)} .
* Construct a new {@code MarshallingHttpMessageConverter} with no {@link Marshaller} or
*
{@link Unmarshaller} set. The Marshaller and Unmarshaller must be set after construction
*
by invoking {@link #setMarshaller(Marshaller)} and {@link
#setUnmarshaller(Unmarshaller)} .
*/
public
MarshallingHttpMessageConverter
()
{
}
/**
* Construct a new {@code MarshallingMessageConverter} with the given {@link Marshaller} set. <p>If the given {@link
* Marshaller} also implements the {@link Unmarshaller} interface, it is used for both marshalling and unmarshalling.
* Otherwise, an exception is thrown. <p>Note that all {@code Marshaller} implementations in Spring also implement the
* Construct a new {@code MarshallingMessageConverter} with the given {@link Marshaller} set.
* <p>If the given {@link Marshaller} also implements the {@link Unmarshaller} interface,
* it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.
* <p>Note that all {@code Marshaller} implementations in Spring also implement the
* {@code Unmarshaller} interface, so that you can safely use this constructor.
* @param marshaller object used as marshaller and unmarshaller
*/
public
MarshallingHttpMessageConverter
(
Marshaller
marshaller
)
{
Assert
.
notNull
(
marshaller
,
"
m
arshaller must not be null"
);
Assert
.
notNull
(
marshaller
,
"
M
arshaller must not be null"
);
this
.
marshaller
=
marshaller
;
if
(
marshaller
instanceof
Unmarshaller
)
{
this
.
unmarshaller
=
(
Unmarshaller
)
marshaller
;
...
...
@@ -75,18 +76,19 @@ public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConve
}
/**
* Construct a new <code>MarshallingMessageConverter</code> with the given
{@code Marshaller} and {@code
* Unmarshaller}.
* Construct a new <code>MarshallingMessageConverter</code> with the given
*
{@code Marshaller} and {@code
Unmarshaller}.
* @param marshaller the Marshaller to use
* @param unmarshaller the Unmarshaller to use
*/
public
MarshallingHttpMessageConverter
(
Marshaller
marshaller
,
Unmarshaller
unmarshaller
)
{
Assert
.
notNull
(
marshaller
,
"
m
arshaller must not be null"
);
Assert
.
notNull
(
unmarshaller
,
"
u
nmarshaller must not be null"
);
Assert
.
notNull
(
marshaller
,
"
M
arshaller must not be null"
);
Assert
.
notNull
(
unmarshaller
,
"
U
nmarshaller must not be null"
);
this
.
marshaller
=
marshaller
;
this
.
unmarshaller
=
unmarshaller
;
}
/**
* Set the {@link Marshaller} to be used by this message converter.
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录