我必须从Spring 2.5迁移到3.0.我的网络服务仍与轴1.4,Spring 2.5的我是相当简单的运行,每个类别的服务实现的扩展了ServletEndpointSupport.在Spring 3.0中,不推荐使用ServletEndpointSupport.
例如:
public class PersonBindingImpl extends ServletEndpointSupport implements PersonPortType {
public PersonDaten PersonQueryRequest(XPAPersonRequest request) throws RemoteException, XPAException {
PersonsImpl persons = getWebApplicationContext().getBean("personImpl", PersonsImpl.class);
return persons.getAllByGroup(request.getGroup());
}
}
Run Code Online (Sandbox Code Playgroud)
有没有办法以Spring 2.5中的简单方式在Spring 3中获取ApplicationContext.
我从事不同的Web服务,我总是使用WSDL First.
JAXB为类型生成:
<xsd:simpleType name="CurrencyFormatTyp">
<xsd:restriction base="xsd:decimal">
<xsd:totalDigits value="13"/>
<xsd:fractionDigits value="2"/>
<xsd:minInclusive value="0.01"/>
</xsd:restriction>
</xsd:simpleType>
Run Code Online (Sandbox Code Playgroud)
Java绑定类型BigDecimal(如JAXB规范中所述).
然后,当我使用类型的值double(存储在数据库中并通过hibernate映射到double类型)进行一些简单的算术运算时,我遇到了麻烦.
<ns5:charge>0.200000000000000011102230246251565404236316680908203125</ns5:charge>
<ns5:addcharge>0.0360000000000000042188474935755948536098003387451171875</ns5:addcharge>
<ns5:tax>0.047199999999999998900879205621095024980604648590087890625</ns5:tax>
<ns5:totalextax>0.2360000000000000153210777398271602578461170196533203125</ns5:totalextax>
Run Code Online (Sandbox Code Playgroud)
什么是正确的方法?
BigDecimal到double)double到Bigdecimal并在一个对象类型中执行所有算术运算.
我在tomcat容器中开发了一个webservice应用程序,我有很多webapp属性,如常量,错误消息等.
什么是更好更快的方式?
如何实现对字段名称内容的自定义排序:
然后其余按正常顺序排列 i1.getName().compareToIgnoreCase(i2.getName())
private static Comparator<Item> itemComperator = new Comparator<Item>() {
@Override
public int compare(Item i1, Item i2) {
if (i1.getName().matches("P[1-9]{2}") && i2.getName().matches("P0[0-9]"))
return -1;
else if (i1.getName().matches("S[1-9]{2}"))
return -1;
else
return i1.getName().compareToIgnoreCase(i2.getName());
}
};
@Test
public void sortItem() {
Item item01 = new Item(1, "R59");
Item item02 = new Item(2, "S48");
Item item03 = new Item(3, "P01");
Item item04 = new Item(4, "P25");
Item item05 = new Item(5, "R99");
List<Item> items = …Run Code Online (Sandbox Code Playgroud)java ×3
axis ×1
bigdecimal ×1
comparator ×1
constants ×1
database ×1
double ×1
jaxb ×1
migration ×1
properties ×1
sorting ×1
spring ×1