전자정부 프레임워크 서비스단
Controller.java
---------------------------------------------------------------------------------------------
@Controller
public class NationController {
@Resource(name = "NationService")
private NationService nationService;
@RequestMapping(value="/test/ChkFind .do")
public String chkfindresult (HttpServletRequest request, Model model) throws Exception {
List<EgovMap> statList = null;
try{
statList = (List<EgovMap>) nationService.getStatFindList();
}catch(Exception e){
}
}
}
NationService.java
---------------------------------------------------------------------------------------------
public interface NationService {
public List<?> getStatFindList() throws Exception;
}
NationServiceImpl.java
---------------------------------------------------------------------------------------------
@Service("NationService")
public class NationServiceImpl implements NationService {
@Resource(name = "NationDAO")
private NationDAO nationDAO;
@Override
public List<?> getStatFindList() throws Exception {
return nationDAO.getStatFindList();
}
}
NationDAO.java
-----------------------------------------------------------
@SuppressWarnings("unchecked")
@Repository("NationDAO")
public class NationDAO extends EgovAbstractDAO{
public List<EgovMap> getStatFindList() throws Exception {
return list("NationDAO.selectfindList","");
}
}