java - Data Entry in List Error Spring -


error creating bean name 'sumitgulati' defined in class path resource [springmodule.xml]: error setting property values; nested exception org.springframework.beans.notwritablepropertyexception: invalid property 'lists' of bean class

spring.xml

<beans xmlns="http://www.springframework.org/schema/beans"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">   <bean id="sumitgulati" class="com.spring.first.listclass">     <!-- java.util.list -->     <property name="lists">       <list>         <value>1</value>         <value>2</value>       </list>     </property>   </bean>  </beans> 

listclass.java

package com.spring.first; import java.util.arraylist; import java.util.list;  public class listclass {     private list<integer> lists=new arraylist<integer>();      @override    public string tostring()    {        return lists.tostring();    }    public list<integer> getlist()    {        return this.lists;    }      public void setlist(arraylist<integer>lists)    {        this.lists=lists;    } } 

above mentioned error coming new spring framework. please


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -