Solution 1: Custom Conversion Mechanism Using Reflection
(obj != <?> cls == cls.getDeclaredFields(); Method m = = (!f.getName().equals("serialVersionUID" String dynamicGetMethod = dynamicMethodName(f.getName(), "get" m = LOG.info(f.getName() + ":" +""+"Object to convert is null."
<T> addConvertBeans(SolrServer server, List<T>, "Add convert object list to index finished. ""Add convert object list to index error, " + <T> addConvertBeans(SolrServer server, List<T>, "Add convert object list to index finished. ""Add convert object list to index error, " +
= <String> title = ArrayList <String> "I pretend after the door that you haven't taken" "Jay Chou" <Article> lists = ArrayList <Article >=< String> atlts1 = ArrayList <string> "No regrets when you say goodbye, hanyue Qing Xiaoyi dream back "" I know that I am in love, the dust is not a total of colorful clouds flying "" Liu mengyu "= <String> atlts2 = ArrayList <String>" Xiao Xiaoqu has nowhere to complain; for Yi, happy. "" Why is it that people are imaginary? If you want to share your thoughts, you will not be able to receive them. "" Liu mengmiao"
Method 2: Use the annotation mechanism provided by solr
Article serialVersionUID = 4017316764889231758L"id""title" List<String> String author; .id = .author = List<String> setTitle(List<String>.title = ToStringBuilder.reflectionToString(
Article serialVersionUID = 4017316764889231758L"id""title" List<String> String author; .id = .author = List<String> setTitle(List<String>.title = ToStringBuilder.reflectionToString(
,"Add object to index finished.""Add object to index error, " + <T> addBeans(SolrServer server, List<T>, "Add object list to index finished. ""Add object list to index finished. "
= <String> title = ArrayList <String> "map: Qingdao, the last islands. "" su ruonian "<Article> lists = ArrayList <Article >=< String> atlts1 = ArrayList <String>" No regrets when you say goodbye, hanyue Qing Xiaoyi dream back "" I know that I am in love, the dust is not a total of colorful cloud flying "" suruonian "= <String> atlts2 = ArrayList <String>" Xiao xiaoxunqu nowhere to complain; it is an easy task. "" Why is it that people are imaginary? If you want to share your thoughts, you will not be able to receive them. "" Liu mengmiao"