Smartclient+demo+实例

2023-12-13 00:32
文章标签 实例 demo smartclient

本文主要是介绍Smartclient+demo+实例,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

用实例见证smartclient的厉害吧。
 先貼出來圖片 炫炫!很閃吧。建表語句:
create table supplyItem(itemID int primary key identity(1,1),itemName varchar(300),unitCost decimal(28,2), --55.23  SKU varchar(30),description varchar(5000),category varchar(128), inStock varchar(30),units varchar(30),nextShipment datetime 
)--drop table supplyCategory
create table supplyCategory(categoryName varchar(128) primary key,parentID varchar(255),  
)
demoAppJS.jsp
Jsp代碼:
<!--------------------------------------------------------------------整合人:舒婷  *_*
---------------------------------------------------------------------->
<HTML>
<HEAD>
<TITLE>SmartClient Demo Application</TITLE>   <meta http-equiv="pragma" content="no-cache"><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="expires" content="0">    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"><meta http-equiv="description" content="This is my page"><SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=smartclient/modules/ISC_History.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_Core.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_Foundation.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_Containers.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_Grids.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_Forms.js></SCRIPT><SCRIPT SRC=smartclient/modules/ISC_DataBinding.js></SCRIPT><SCRIPT SRC=smartclient/modules/load_skin.js></SCRIPT>
</HEAD><BODY CLASS="pageBackground" STYLE="overflow:hidden">
<script src="demoAppJS.js"></script>
</BODY>
</HTML>demoAppJS.jsisc.setAutoDraw(false);
//<isomorphic:loadDS name="supplyItem"/>
//<isomorphic:loadDS name="supplyCategory"/>
isc.DataSource.create({ID:"supplyCategory",dataFormat:"xml",recordXPath:"//country",fields:[{name:"categoryName",primaryKey:true},{foreignKey:"supplyCategory.categoryName",//这一步 不懂、??hidden:true,name:"parentID",required:true,rootValue:"root", //初始化加载parentID为root记录  如果没有设置rootValue 会出现死循环式的树type:"text"}],operationBindings:[{operationType:"fetch",dataURL:"demoApp/findTreeAll.action"}]
});
isc.DataSource.create({ ID:"supplyItem",dataFormat:"xml",  //数据格式 xml格式recordXPath:"//country", //--<country></country>fields:[//{name:"itemId",primaryKey:true},//countryCode設置為主鍵{name:"itemName", title:"itemName"},{name:"unitCost", title:"unitCost"},{name:"SKU",title:"SKU"},{name:"description",title:"description"},{name:"category",title:"category"},{name:"inStock",title:"inStock"},{name:"nextShipment",title:"nextShipment"}],operationBindings:[ {operationType:"fetch",dataURL:"demoApp/findAll.action"},{operationType:"add"//dataURL:"country/insertInfo.action"},{operationType:"update"//dataURL:"country/updateInfo.action"},{operationType:"remove"//dataURL:"country/deleteInfo.action"}]});
isc.Page.setAppImgDir(isc.Page.getIsomorphicDocsDir()+"exampleImages/"); //设置img文件路径isc.TreeGrid.create({ID:"categoryTree",dataSource:"supplyCategory",nodeClick:"findForm.findItems(node.categoryName)",showHeader:false,leaveScrollbarGap:false,animateFolders:true,canAcceptDroppedRecords:true,canReparentNodes:false,selectionType:"single",animateRowsMaxTime:750
});isc.HTMLPane.create({ID:"helpCanvas",contentsURL:"demoApp_helpText.html",overflow:"auto",styleName:"defaultBorder",padding:10
});isc.IButton.create({ID:"findButton",title:"Find",left:25,top:16,width:80,click:"findForm.findItems()",icon:"demoApp/icon_find.png",iconWidth:24
});isc.SearchForm.create({ID:"findForm",dataSource:supplyItem,left:130,top:10,cellPadding:4,numCols:6,fields:[{name:"SKU"},{name:"itemName", editorType:"comboBox", optionDataSource:"supplyItem", pickListWidth:250},{name:"findInCategory", editorType:"checkbox", title:"Use category", defaultValue:true, shouldSaveValue:false}],// Function to actually find itemsfindItems : function (categoryName) {var findValues;if (this.getValue('findInCategory') && categoryTree.selection.anySelected()) {// use tree category and form valuesif (categoryName == null) categoryName = categoryTree.getSelectedRecord().categoryName;findValues = {category:categoryName};isc.addProperties(findValues, this.getValues());} else if (categoryName == null) {// use form values onlyfindValues = this.getValues();} else {// use tree category onlyfindValues = {category:categoryName};}itemList.filterData(findValues);itemDetailTabs.clearDetails();}
});isc.ListGrid.create({ID:"itemList",dataSource:supplyItem,useAllDataSourceFields:true,fields:[{name:"itemName", title:"Name", showHover:true},{name:"unitCost", formatCellValue:"return isc.Format.toCurrencyString(parseFloat(value))", editorType:"spinner", editorProperties:{step:0.01}},{name:"SKU", canEdit:false},{name:"description", showHover:true},{name:"category", canEdit:false},{name:"inStock", width:55, align:"center",formatCellValue : function (value, record, field, rowNum, colNum) {if (value) return isc.Canvas.imgHTML("demoApp/checked.png",13,13);else return isc.Canvas.imgHTML("demoApp/unchecked.png",13,13)}},{name:"nextShipment", showIf:"false"}],recordClick:"this.updateDetails()",canEdit:true,modalEditing:true,cellChanged:"this.updateDetails()",alternateRecordStyles:true,canDragRecordsOut:true,hoverWidth:200,hoverHeight:20,selectionType:"single",cellContextClick:"return itemListMenu.showContextMenu()",updateDetails : function () {var record = this.getSelectedRecord();if (record == null) return itemDetailTabs.clearDetails();if (itemDetailTabs.getSelectedTabNumber() == 0) {            itemViewer.setData(record) } else {itemDetailTabs.updateTab("editTab", editForm);editForm.editRecord(record);}}
});isc.Menu.create({ID:"itemListMenu",cellHeight:22,data:[{title:"Add New Item",icon:"demoApp/icon_add.png",click:function () {itemList.selection.deselectAll();itemDetailTabs.selectTab(1);itemList.updateDetails();}},{isSeparator:true},{title:"Show Details",icon:"demoApp/icon_view.png",click:"itemDetailTabs.selectTab(0); itemList.updateDetails()"},{title:"Edit Item",icon:"demoApp/icon_edit.png",click:"itemDetailTabs.selectTab(1); itemList.updateDetails()"},{title:"Delete Item",icon:"demoApp/icon_delete.png",click:"itemList.removeSelectedData(); itemDetailTabs.clearDetails()"}]
});isc.DetailViewer.create({ID:"itemViewer",dataSource:supplyItem,width:"100%",margin:"25",emptyMessage:"Select an item to view its details"
});isc.DynamicForm.create({ID:"editForm",dataSource:supplyItem,useAllDataSourceFields:true,fields:[{name:"SKU"},{name:"description", editorType:"textArea",rowSpan:3, width:200},{name:"category", editorType:"pickTree", dataSource:supplyCategory, // 无法显示editformemptyMenuMessage:"No Sub Categories", canSelectParentItems:true},{name:"unitCost", editorType:"spinner", step:0.01},{name:"inStock"},{name:"nextShipment", useTextField:true,editorType:"date"},{name:"savebtn", editorType:"button", align:"center", width:100, colSpan:4, title:"Save Item", click:"editForm.saveData()"}],width:650,numCols:4,colWidths:[100,200,100,200],margin:25,cellPadding:5,autoFocus:false
});isc.Label.create({ID:"editorMessage",autoDraw: false,width:"100%",height:"100%",align:"center",contents:"Select a record to edit, or a category to insert a new record into"
});isc.TabSet.create({ID:"itemDetailTabs",tabs:[{title:"View", pane:itemViewer, ID:"viewTab", width:70, icon:"demoApp/icon_view.png"},{title:"Edit", pane:editForm, ID:"editTab", width:70, icon:"demoApp/icon_edit.png"}],tabSelected:"itemList.updateDetails()",clearDetails : function () {var selectedTab = this.getSelectedTabNumber();if (selectedTab == 0) {itemViewer.setData();} else if (selectedTab == 1) {if (categoryTree.getSelectedRecord() != null) {this.updateTab("editTab", editForm);editForm.editNewRecord({category:categoryTree.getSelectedRecord().categoryName});} else {this.updateTab("editTab", editorMessage);}}}});
// Define application layout
// ---------------------------------------------------------------------isc.HLayout.create({ID:"pageLayout",width:"100%",height:"100%",layoutMargin:20,members:[isc.SectionStack.create({ID:"leftSideLayout",width:280,showResizeBar:true,visibilityMode:"multiple",animateSections:true,sections:[{title:"Office Supply Categories", autoShow:true, items:[categoryTree]},{title:"Instructions", autoShow:true, items:[helpCanvas]}]}),isc.SectionStack.create({ID:"rightSideLayout",visibilityMode:"multiple",animateSections:true,sections:[{title:"Find Items", autoShow:true, items:[isc.Canvas.create({ID:"findPane",height:60,overflow:"auto",styleName:"defaultBorder",children:[findForm,findButton]})				]},{title:"Office Supply Items", autoShow:true, items:[itemList]},{title:"Item Details", autoShow:true, items:[itemDetailTabs]}]})]
});isc.Page.setEvent("load", "pageLayout.draw()");
// Custom logic: 
// When showing options in the combo-box, only show the options from the selected category
// if appropriate
findForm.getItem("itemName").addProperties({getPickListFilterCriteria : function () {var criteria = this.Super("getPickListFilterCriteria", arguments);if (this.form.getValue('findInCategory') && categoryTree.selection.anySelected()) {criteria.category = categoryTree.getSelectedRecord().categoryName;}return criteria}
});categoryTree.fetchData();java代碼
DAO 層
package isc.java.Dao;import isc.java.Module.supplyItem;import java.util.List;import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class supplyItem_Dao {private HibernateTemplate hibernateTemplate;@SuppressWarnings("unused")@Autowiredprivate void setHibernateTemplate (SessionFactory sessionFactory){this.hibernateTemplate =new HibernateTemplate(sessionFactory);}/** 	function findAll* 	查询supplyItem表中所有记录*  并以list形式返回*  * */@SuppressWarnings("unchecked")public List<supplyItem> findAll(String category){String hql="from supplyItem where category='"+category+"'";List list=this.hibernateTemplate.find(hql);return list;}/** 根据category返回对应的记录* */@SuppressWarnings("unchecked")public supplyItem findInfoByID (int itemID){supplyItem supp=(supplyItem) this.hibernateTemplate.get(supplyItem.class, itemID);return supp;}/** 删除指定记录* * */public void deleteInfo(supplyItem supp){this.hibernateTemplate.delete(supp);}/** 更新修改后的记录* */public void updateInfo(supplyItem supp){this.hibernateTemplate.update(supp);}/**增加记录 * */public void insertInfo(supplyItem supp){this.hibernateTemplate.save(supp);}
}package isc.java.Dao;import isc.java.Module.supplyCategory;import java.util.List;import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateTemplate;
import org.springframework.stereotype.Repository;
@Repository
public class supplyCategory_Dao {private HibernateTemplate hibernateTemplate;@SuppressWarnings("unused")@Autowiredprivate void setHibernateTemplate (SessionFactory sessionFactory){this.hibernateTemplate =new HibernateTemplate(sessionFactory);}@SuppressWarnings("unchecked")public List<supplyCategory> findAll(String parentId){String hql="from supplyCategory where parentId='"+parentId+"'";List list =this.hibernateTemplate.find(hql);return list;}
}ENTITY層
package isc.java.Module;import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;@Entity
@Table(name="supplyCategory")
public class supplyCategory {private String categoryName;private String parentId;@Id@Column(name="categoryName")public String getCategoryName() {return categoryName;}public void setCategoryName(String categoryName) {this.categoryName = categoryName;}@Column(name="parentId")public String getParentId() {return parentId;}public void setParentId(String parentId) {this.parentId = parentId;}}package isc.java.Module;import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;@Entity
@Table(name="supplyItem")
public class supplyItem {private int itemID ;private String itemName;private double unitCost;private String SKU;private String description;private String category;private String inStock;private String nextShipment;@Id@GeneratedValue@Column(name="itemID")public int getItemID() {return itemID;}public void setItemID(int itemID) {this.itemID = itemID;}@Column(name="itemName")public String getItemName() {return itemName;}public void setItemName(String itemName) {this.itemName = itemName;}@Column(name="unitCost")public double getUnitCost() {return unitCost;}public void setUnitCost(double unitCost) {this.unitCost= unitCost;}@Column(name="SKU")public String getSKU() {return SKU;}public void setSKU(String sku) {SKU = sku;}@Column(name="description")public String getDescription() {return description;}public void setDescription(String description) {this.description = description;}@Column(name="category")public String getCategory() {return category;}public void setCategory(String category) {this.category = category;}@Column(name="instock")public String getInStock() {return inStock;}public void setInStock(String inStock) {this.inStock = inStock;}@Column(name="nextShipment")public String getNextShipment() {return nextShipment;}public void setNextShipment(String nextShipment) {this.nextShipment = nextShipment;}}Service 層package isc.java.Service;import isc.java.Dao.supplyCategory_Dao;
import isc.java.Module.supplyCategory;import java.util.List;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;@Service
public class supplyCategory_Service {private supplyCategory_Dao supplyCategory_dao;@Autowiredpublic void setSupplyCategory_dao(supplyCategory_Dao supplyCategory_dao) {this.supplyCategory_dao = supplyCategory_dao;}@Transactional("demoApp")public List<supplyCategory> findAll(String parentId){return this.supplyCategory_dao.findAll(parentId);}
}package isc.java.Service;import isc.java.Dao.supplyItem_Dao;
import isc.java.Module.supplyItem;import java.util.List;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
public class supplyItem_Service {private supplyItem_Dao supplyItem_dao;@Autowiredpublic void setSupplyItem_dao(supplyItem_Dao supplyItem_dao) {this.supplyItem_dao = supplyItem_dao;}/* * 使用声明式事物管理* 在业务方法上进行@Transactional注解 * 将事物规则应用到业务逻辑中* demoApp为限定词*_** */@Transactional("demoApp")public List<supplyItem> findAll(String category){return this.supplyItem_dao.findAll(category);}@Transactional("demoApp")public supplyItem findInfoByID(int itemID){return this.supplyItem_dao.findInfoByID(itemID);}@Transactional("demoApp")public void deleteInfo(int itemID){supplyItem supp =this.supplyItem_dao.findInfoByID(itemID);this.supplyItem_dao.deleteInfo(supp);}@Transactional("demoApp")public void updateInfo(supplyItem supp){this.supplyItem_dao.updateInfo(supp);}@Transactional("demoApp")public void insertInfo(supplyItem supp){this.supplyItem_dao.insertInfo(supp);}
}Web層package isc.java.Web;import isc.java.Module.supplyCategory;
import isc.java.Service.supplyCategory_Service;import java.io.IOException;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class supplyCategory_Controller {private supplyCategory_Service supplyCategory_service;@Autowiredpublic void setSupplyCategory_service(supplyCategory_Service supplyCategory_service) {this.supplyCategory_service = supplyCategory_service;}@SuppressWarnings("unchecked")@RequestMapping(value="demoApp/findTreeAll.action")public void findAll(HttpServletResponse response,HttpServletRequest request){String parentId=request.getParameter("parentID");List<supplyCategory> list=this.supplyCategory_service.findAll(parentId);ServletOutputStream sos=null;try {sos=response.getOutputStream();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}StringBuffer sbu=new StringBuffer();Iterator ita=(Iterator)list.iterator();while(ita.hasNext()){supplyCategory supplycategory=(supplyCategory)ita.next();sbu.append("<country>");sbu.append("<categoryName>"+supplycategory.getCategoryName()+"</categoryName>");sbu.append("<parentId>"+supplycategory.getParentId()+"</parentId>");sbu.append("</country>");}try {sos.print("<?xml version='1.0' encoding='UTF-8'?><records>"+sbu.toString()+"</records>");} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}
}package isc.java.Web;import isc.java.Module.supplyItem;
import isc.java.Service.supplyItem_Service;import java.io.IOException;
import java.util.Iterator;
import java.util.List;import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class supplyItem_Controller {private supplyItem_Service supplyItem_service;@Autowiredpublic void setSupplyItem_service(supplyItem_Service supplyItem_service) {this.supplyItem_service = supplyItem_service;}/** 从数据库中提取数据 以xml格式存储* * */@SuppressWarnings("unchecked")@RequestMapping(value="demoApp/findAll.action")public void findAll(HttpServletResponse response,HttpServletRequest request){String category=request.getParameter("category");//接受前台传过来的参数List<supplyItem>list =this.supplyItem_service.findAll(category);ServletOutputStream sos=null;try {sos = response.getOutputStream();} catch (IOException e) {e.printStackTrace();}StringBuffer sbu=new StringBuffer();Iterator ita = (Iterator) list.iterator();while(ita.hasNext()){supplyItem supplyitem=(supplyItem)ita.next();sbu.append("<country>");sbu.append("<itemID>"+supplyitem.getItemID()+"</itemID>");sbu.append("<itemName>"+supplyitem.getItemName()+"</itemName>");sbu.append("<unitCost>"+supplyitem.getUnitCost()+"</unitCost>");sbu.append("<SKU>"+supplyitem.getSKU()+"</SKU>");sbu.append("<description>"+supplyitem.getDescription()+"</description>");sbu.append("<category>"+supplyitem.getCategory()+"</category>");sbu.append("<inStock>"+supplyitem.getInStock()+"</inStock>");sbu.append("<nextShipment>"+supplyitem.getNextShipment()+"</nextShipment>");sbu.append("</country>");}try {sos.print("<?xml version='1.0' encoding='UTF-8'?><records>"+sbu.toString()+"</records>");} catch (IOException e) { e.printStackTrace();}}@RequestMapping(value="demoApp/deleteInfo.action")public void deleteInfo(HttpServletRequest request){int itemID=Integer.parseInt(request.getParameter("itemID"));
System.out.println("test======================"+itemID);this.supplyItem_service.deleteInfo(itemID);}@RequestMapping(value="demoApp/updateInfo.action")public void updateInfo(HttpServletRequest request){int itemID=Integer.parseInt(request.getParameter("itemID"));supplyItem supp=this.supplyItem_service.findInfoByID(itemID);supp.setSKU(request.getParameter("SKU"));supp.setCategory(request.getParameter("category"));supp.setDescription(request.getParameter("description"));supp.setInStock(request.getParameter("inStock"));supp.setItemName(request.getParameter("itemName"));supp.setNextShipment(request.getParameter("nextShipment"));String s=request.getParameter("unitCost");supp.setUnitCost(Double.parseDouble(s));this.supplyItem_service.updateInfo(supp);}@RequestMapping(value="demoApp/insertInfo.action")public void insertInfo(HttpServletRequest request){supplyItem supp=new supplyItem();supp.setCategory(request.getParameter("category"));supp.setSKU(request.getParameter("SKU"));supp.setDescription(request.getParameter("description"));supp.setInStock(request.getParameter("inStock"));supp.setItemName(request.getParameter("itemName"));supp.setNextShipment(request.getParameter("nextShipment"));supp.setUnitCost(Double.parseDouble(request.getParameter("unitCost")));this.supplyItem_service.insertInfo(supp);}
}Xml App-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:mvc="http://www.springframework.org/schema/mvc"xmlns:context="http://www.springframework.org/schema/context"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsdhttp://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"><!-- Scans the classpath of this application for @Components to deploy as beans --><!-- 規約所有進行掃描的類,以完成Bean創建和自動依賴注入功能 --><context:component-scan base-package="isc.java.*" />  <!-- <context:annotation-config /> --><!-- Configures the @Controller programming model --><mvc:annotation-driven /><!-- misc --><bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"><property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/><property name="suffix" value=".action"/></bean><!-- Configures Hibernate - Database Config --><import resource="db-config.xml" />
</beans>Db-config.xml<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:tx="http://www.springframework.org/schema/tx"xmlns:aop="http://www.springframework.org/schema/aop"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"><bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"><property name="driverClassName"><value>com.microsoft.sqlserver.jdbc.SQLServerDriver</value></property><property name="url"><value>jdbc:sqlserver://10.1.100.215:1433;DatabaseName=email</value></property><property name="username"><value>dev</value></property><property name="password"><value>12345678aA</value></property></bean><bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"><property name="dataSource"><ref local="dataSource"/></property><property name="packagesToScan" value="isc.java.*" /><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop><prop key="hibernate.show_sql">true</prop><!--  <prop key="hibernate.hbm2ddl.auto">update</prop>--><prop key="hibernate.format_sql">true</prop></props></property></bean>	 <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) --><tx:annotation-driven/><bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory"><ref local="sessionFactory"/></property><qualifier value="demoApp"/> <!-- 限定词 --></bean>
</beans>


这篇关于Smartclient+demo+实例的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/486494

相关文章

【机器学习】高斯过程的基本概念和应用领域以及在python中的实例

引言 高斯过程(Gaussian Process,简称GP)是一种概率模型,用于描述一组随机变量的联合概率分布,其中任何一个有限维度的子集都具有高斯分布 文章目录 引言一、高斯过程1.1 基本定义1.1.1 随机过程1.1.2 高斯分布 1.2 高斯过程的特性1.2.1 联合高斯性1.2.2 均值函数1.2.3 协方差函数(或核函数) 1.3 核函数1.4 高斯过程回归(Gauss

C++操作符重载实例(独立函数)

C++操作符重载实例,我们把坐标值CVector的加法进行重载,计算c3=c1+c2时,也就是计算x3=x1+x2,y3=y1+y2,今天我们以独立函数的方式重载操作符+(加号),以下是C++代码: c1802.cpp源代码: D:\YcjWork\CppTour>vim c1802.cpp #include <iostream>using namespace std;/*** 以独立函数

实例:如何统计当前主机的连接状态和连接数

统计当前主机的连接状态和连接数 在 Linux 中,可使用 ss 命令来查看主机的网络连接状态。以下是统计当前主机连接状态和连接主机数量的具体操作。 1. 统计当前主机的连接状态 使用 ss 命令结合 grep、cut、sort 和 uniq 命令来统计当前主机的 TCP 连接状态。 ss -nta | grep -v '^State' | cut -d " " -f 1 | sort |

Java Websocket实例【服务端与客户端实现全双工通讯】

Java Websocket实例【服务端与客户端实现全双工通讯】 现很多网站为了实现即时通讯,所用的技术都是轮询(polling)。轮询是在特定的的时间间隔(如每1秒),由浏览器对服务器发 出HTTP request,然后由服务器返回最新的数据给客服端的浏览器。这种传统的HTTP request 的模式带来很明显的缺点 – 浏 览器需要不断的向服务器发出请求,然而HTTP

828华为云征文|华为云Flexus X实例docker部署rancher并构建k8s集群

828华为云征文|华为云Flexus X实例docker部署rancher并构建k8s集群 华为云最近正在举办828 B2B企业节,Flexus X实例的促销力度非常大,特别适合那些对算力性能有高要求的小伙伴。如果你有自建MySQL、Redis、Nginx等服务的需求,一定不要错过这个机会。赶紧去看看吧! 什么是华为云Flexus X实例 华为云Flexus X实例云服务是新一代开箱即用、体

LLVM入门2:如何基于自己的代码生成IR-LLVM IR code generation实例介绍

概述 本节将通过一个简单的例子来介绍如何生成llvm IR,以Kaleidoscope IR中的例子为例,我们基于LLVM接口构建一个简单的编译器,实现简单的语句解析并转化为LLVM IR,生成对应的LLVM IR部分,代码如下,文件名为toy.cpp,先给出代码,后面会详细介绍每一步分代码: #include "llvm/ADT/APFloat.h"#include "llvm/ADT/S

OpenStack离线Train版安装系列—11.5实例使用-Cinder存储服务组件

本系列文章包含从OpenStack离线源制作到完成OpenStack安装的全部过程。 在本系列教程中使用的OpenStack的安装版本为第20个版本Train(简称T版本),2020年5月13日,OpenStack社区发布了第21个版本Ussuri(简称U版本)。 OpenStack部署系列文章 OpenStack Victoria版 安装部署系列教程 OpenStack Ussuri版

linux 内核提权总结(demo+exp分析) -- 任意读写(四)

hijack_modprobe_path篇 本文转自网络文章,内容均为非盈利,版权归原作者所有。 转载此文章仅为个人收藏,分享知识,如有侵权,马上删除。 原文作者:jmpcall 专栏地址:https://zhuanlan.kanxue.com/user-815036.htm     原理同hijack_prctl, 当用户执行错误格式的elf文件时内核调用call_usermod

linux 内核提权总结(demo+exp分析) -- 任意读写(三)

hijack_prctl篇 本文转自网络文章,内容均为非盈利,版权归原作者所有。 转载此文章仅为个人收藏,分享知识,如有侵权,马上删除。 原文作者:jmpcall 专栏地址:https://zhuanlan.kanxue.com/user-815036.htm   prctl函数: 用户态函数,可用于定制进程参数,非常适合和内核进行交互 用户态执行prctl函数后触发prctl系统

linux 内核提权总结(demo+exp分析) -- 任意读写(二)

hijack_vdso篇 本文转自网络文章,内容均为非盈利,版权归原作者所有。 转载此文章仅为个人收藏,分享知识,如有侵权,马上删除。 原文作者:jmpcall 专栏地址:https://zhuanlan.kanxue.com/user-815036.htm     vdso: 内核实现的一个动态库,存在于内核,然后映射到用户态空间,可由用户态直接调用 内核中的vdso如果被修改