Creating Spring Bean Class

From Documentation
Revision as of 10:38, 19 January 2022 by Hawk (talk | contribs) (correct highlight (via JWB))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Creating Spring Bean Class


Stop.png This documentation is for an older version of ZK. For the latest one, please click here.


For OOP programming, you have to define a DataSource interface:

DataSource.java

 package test;
 
 public interface DataSource
 {
   java.util.List getElementsList();
 }

and its implementation:

DataSourceImpl.java

 package test;
 
 import java.util.*;
 
 public class DataSourceImpl implements DataSource
 {
   public List getElementsList()
   {
        List list = new ArrayList();
         list.add("Tom");
         list.add("Henri");
         list.add("Jim");
         
         return list;
   }
 }


Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.