INTSAMPLES-138: Make SI 4.1 as minimal
JIRA: https://jira.spring.io/browse/INTSAMPLES-138 * Upgrade to Boot 1.2, which is based on the SI 4.1 * Upgrade to SF 4.1.1 * Fix `feed` sample to use new `Rome` dep. from SI * Fix deprecations for `@Payload`, `@Header` etc. * Fix mongo` sample deprecation warn
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.feed;
|
||||
|
||||
import org.junit.Test;
|
||||
@@ -22,7 +23,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.PollableChannel;
|
||||
|
||||
import com.sun.syndication.feed.synd.SyndEntry;
|
||||
import com.rometools.rome.feed.synd.SyndEntry;
|
||||
|
||||
/**
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -48,4 +49,5 @@ public class FeedInboundChannelAdapterSample {
|
||||
}
|
||||
ac.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.jdbc.service;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,16 +29,16 @@ public interface PersonService {
|
||||
|
||||
/**
|
||||
* Creates a {@link Person} instance from the {@link Person} instance passed
|
||||
*
|
||||
* @param the created person instance, it will contain the generated primary key and the formated name
|
||||
* @return
|
||||
*
|
||||
* @param person created person instance, it will contain the generated primary key and the formatted name
|
||||
* @return the retrieved {@link Person}
|
||||
*/
|
||||
Person createPerson(Person person);
|
||||
|
||||
|
||||
/**
|
||||
* Find the person by the person name, the name search is case insensitive, however the
|
||||
* Find the person by the person name, the name search is case insensitive, however the
|
||||
* spaces are not ignored
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* @return the matching {@link Person} record
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -13,12 +13,13 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.jpa.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.integration.annotation.Payload;
|
||||
import org.springframework.integration.samples.jpa.Person;
|
||||
import org.springframework.messaging.handler.annotation.Payload;
|
||||
|
||||
/**
|
||||
* The Service is used to create Person instance in database
|
||||
@@ -32,7 +33,7 @@ public interface PersonService {
|
||||
/**
|
||||
* Creates a {@link Person} instance from the {@link Person} instance passed
|
||||
*
|
||||
* @param the created person instance, it will contain the generated primary key and the formated name
|
||||
* @param person created person instance, it will contain the generated primary key and the formated name
|
||||
* @return The persisted Entity
|
||||
*/
|
||||
Person createPerson(Person person);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -13,10 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.mongodb.util;
|
||||
|
||||
import org.springframework.data.mapping.context.MappingContext;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultDbRefResolver;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoPersistentEntity;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoPersistentProperty;
|
||||
@@ -24,6 +26,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
import com.mongodb.BasicDBObject;
|
||||
import com.mongodb.DBObject;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Oleg Zhurakousky
|
||||
@@ -33,8 +36,9 @@ public class StringConverter extends MappingMongoConverter {
|
||||
public StringConverter(
|
||||
MongoDbFactory mongoDbFactory,
|
||||
MappingContext<? extends MongoPersistentEntity<?>, MongoPersistentProperty> mappingContext) {
|
||||
super(mongoDbFactory, mappingContext);
|
||||
super(new DefaultDbRefResolver(mongoDbFactory), mappingContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Object source, DBObject target) {
|
||||
String strPerson = (String) source;
|
||||
@@ -52,14 +56,13 @@ public class StringConverter extends MappingMongoConverter {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <S> S read(Class<S> clazz, DBObject source) {
|
||||
StringBuffer buffer = new StringBuffer();
|
||||
buffer.append(source.get("fname") + ", ");
|
||||
buffer.append(source.get("lname") + ", ");
|
||||
buffer.append(source.get("city") + ", ");
|
||||
buffer.append(source.get("street") + ", ");
|
||||
buffer.append(source.get("zip") + ", ");
|
||||
buffer.append(source.get("state") + ", ");
|
||||
return (S) buffer.toString();
|
||||
return (S) ((source.get("fname") + ", ")
|
||||
+ source.get("lname") + ", "
|
||||
+ source.get("city") + ", "
|
||||
+ source.get("street") + ", "
|
||||
+ source.get("zip") + ", "
|
||||
+ source.get("state") + ", ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2014 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.
|
||||
@@ -13,10 +13,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.samples.testing.gateway;
|
||||
|
||||
import org.springframework.integration.annotation.Header;
|
||||
import org.springframework.integration.file.FileHeaders;
|
||||
import org.springframework.messaging.handler.annotation.Header;
|
||||
|
||||
/**
|
||||
* @author Gary Russell
|
||||
|
||||
Reference in New Issue
Block a user