学习BME要明确Service,Dao,Do,Entity的含义:
Service:是对页面提供的方法接口,Dao是对接口的实现,Do是对页面和Dao是要用到的属性
定义,Entity大多数的情况下是对数据库表实体的定义.
//得到数据源连接.
BmeJpaTemplate conn=new BmeJpaTemplate();
//业务和页面跳转.XML
<?xml version="1.0" encoding="UTF-8"?>
<businesses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.huawei.com/bme/schema/web">
<business name="EsbUserOperLog" do="spring:EsbLogDo"
start-step="QueryAllLog" extends="global-default"
service-bean="spring:EsbLogService">
<step name="QueryAllLog" view="/esblog/displayesbloginfos.usl">
<before service-bean="spring:EsbLogService"
service="findAllEsbLogs(%{#BMEModel})" />
</step>
<step name="AddEsbUserOperLog" view="/esblog/addesblog.usl"></step>
</business>
//页面显示菜单的.XML
<?xml version="1.0" encoding="UTF-8"?>
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.huawei.com/bme/schema/menu">
<menu id="20000" auth-id="BME.MENU.DEMO" name="BME.DEMO.MENU.DEMO"
leaf="false" parent="root" order="5" />
<menu name="Esb Log" id="20011" auth-id="ESBLOG" order="1" leaf="true"
parent="20000" type="menu" url="/business.action?BMEBusiness=EsbUserOperLog">
</menu>