weblogic使用wlst脚本实现自动部署
创建weblogic的server和cluster
ip="10.20.0.2"
nwport=8001
wwport=9001 nwlist=[
('wtdsrwnw','Cluster_dsrwnw',8111),
('wtjscxnw','Cluster_jscxnw',8151),
('wtmhnw','Cluster_mhnw',8801),
('wttyrznw','Cluster_tyrznw',8701),
('wtwsjsnw','Cluster_wsjsnw',8501),
('wtwssbnw','Cluster_wssbnw',8101),
('wtwsznw','Cluster_wsznw',8401)
] wwlist=[
('wtmhww','Cluster_mhww',9801),
('wtwsjsww','Cluster_wsjsww',9501),
('wtwssbww','Cluster_wssbww',9101),
('wtwszww','Cluster_wszww',9401)
] def create_servers(port,serverlist):
connect('weblogic','aaaaaa', 't3://%s:%s' %(ip,port))
edit()
startEdit()
for server in serverlist:
cd('/')
cmo.createServer('%s' %server[0])
cd('/Servers/%s' %server[0])
cmo.setListenAddress('%s' %ip)
cmo.setListenPort(server[2]) cd('/')
cmo.createCluster('%s' %server[1]) cd('/Clusters/%s' %server[1])
cmo.setClusterMessagingMode('unicast')
cmo.setClusterBroadcastChannel('') cd('/Servers/%s' %server[0])
cmo.setCluster(getMBean('/Clusters/%s' %server[1])) save()
activate(block="true")
import sys def create_server(ip,port,server_name,server_port,server_cluster):
connect('weblogic','aaaaa', 't3://%s:%s' %(ip,port))
edit()
startEdit()
cd('/')
server_flag = getMBean('/Servers/%s' %server_name)
if not server_flag:
cmo.createServer('%s' %server_name)
cd('/Servers/%s' %server_name)
cmo.setListenAddress('%s' %ip)
cmo.setListenPort(int(server_port)) cd('/')
cluster_flag= getMBean('/Clusters/%s' %server_cluster)
if not cluster_flag:
cmo.createCluster('%s' %server_cluster) cd('/Clusters/%s' %server_cluster)
cmo.setClusterMessagingMode('unicast')
cmo.setClusterBroadcastChannel('') cd('/Servers/%s' %server_name)
cmo.setCluster(getMBean('/Clusters/%s' %server_cluster)) save()
activate(block="true") create_server(ip=sys.argv[1],port=sys.argv[2],server_name=sys.argv[3],server_port=sys.argv[4],server_cluster=sys.argv[5])
创建jms服务器
ip="10.199.137.124"
nwport=8001
wwport=9001 nwjms_list=[('JMSServer-mhnw','wtmhnw'),('JMSServer-wsznw01','wtwsznw')]
wwjms_list=[('JMSServer-mhww','wtmhww')] def create_jms(port,jmslist):
connect('weblogic','aaaaaa', 't3://%s:%s' %(ip,port))
edit()
startEdit() for jms in jms_list:
cd('/')
cmo.createJMSServer('%s' %jms[0])
cd('/Deployments/%s' %jms[0])
set('Targets',jarray.array([ObjectName('com.bea:Name=%s,Type=Server' %jms[1])], ObjectName)) save()
activate(block="true")
import sys def create_server(ip,port,jmsname,jmstarget):
connect('weblogic', 'aaaaa', 't3://%s:%s' % (ip, port))
edit()
startEdit()
flag= getMBean('/Deployments/%s' %jmsname)
if not flag:
cmo.createJMSServer('%s' % jmsname)
cd('/Deployments/%s' % jmsname)
set('Targets', jarray.array([ObjectName('com.bea:Name=%s,Type=Server' % jmstarget)], ObjectName))
save()
activate(block="true") create_server(ip=sys.argv[1],port=sys.argv[2],jmsname=sys.argv[3],jmstarget=sys.argv[4])
创建jms模块
ip="10.199.137.124"
nwport=8001
wwport=9001 nwjsmodule_list=[
{"name":"JmsModule-mhnw","resources":[
{"resourcename":"jms/connFactMhnw","type":"connectFactory"},
{"resourcename":"jms/queueMhnwEmail","type":"queue"},
{"resourcename":"jms/queueMhnwOperateLog","type":"queue"},
{"resourcename":"jms/queueMhnwSms","type":"queue"},
{"resourcename":"jms/queueMhnwZcm","type":"queue"}
],
"targets":["wtmhnw"]},
{
"name":"SystemModule-wsz","resources":[
{"resourcename": "jms/connFactNsqd", "type": "connectFactory"},
{"resourcename": "jms/queueMakeNsqd", "type": "queue"},
{"resourcename": "jms/queueNsqdEmail", "type": "queue"}
],
"targets":["wtwsznw"]
}
] wwjsmodule_list=[
{"name": "JmsModule-mhww", "resources": [
{"resourcename": "jms/connFactMhww", "type": "connectFactory"},
{"resourcename": "jms/queueMhwwEmail", "type": "queue"},
{"resourcename": " jms/queueMhwwSms", "type": "queue"}
]
}
] def create_jmsmodule(port,jsmodule_list):
connect('weblogic', 'aaaaa', 't3://%s:%s' %(ip,port))
edit()
startEdit()
for jsmodule in jsmodule_list:
cd('/')
cmo.createJMSSystemResource('%s' %jsmodule["name"])
cd('/SystemResources/%s' %jsmodule["name"])
taglist = []
for tag in jsmodule["targets"]:
taglist.append(ObjectName('com.bea:Name=%s,Type=Server' % tag))
set('Targets', jarray.array(taglist, ObjectName))
for resource in jsmodule["resources"]:
cd('/JMSSystemResources/%s/JMSResource/%s' % (jsmodule["name"],jsmodule["name"]))
if resource["type"]=="connectFactory":
cmo.createConnectionFactory('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setJNDIName('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/SecurityParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setAttachJMSXUserId(false)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/ClientParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setClientIdPolicy('Restricted')
cmo.setSubscriptionSharingPolicy('Exclusive')
cmo.setMessagesMaximum(10)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/TransactionParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setXAConnectionFactoryEnabled(true)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setDefaultTargetingEnabled(true)
else:
cmo.createUniformDistributedQueue('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/UniformDistributedQueues/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setJNDIName('%s' %resource["resourcename"])
cmo.setDefaultTargetingEnabled(true) save()
activate(block="true")
import os def create_jmsmodule(ip,port,filename):
f = open(filename, "r")
re = f.read()
jsmodule = eval(re)
f.close() connect('weblogic', 'aaaaa', 't3://%s:%s' %(ip,port))
edit()
startEdit()
flag = getMBean("/SystemResources/%s" %jsmodule["name"])
if not flag:
cd('/')
cmo.createJMSSystemResource('%s' %jsmodule["name"])
cd('/SystemResources/%s' %jsmodule["name"])
taglist = []
for tag in jsmodule["targets"]:
taglist.append(ObjectName('com.bea:Name=%s,Type=Server' % tag))
set('Targets', jarray.array(taglist, ObjectName))
for resource in jsmodule["resources"]:
cd('/JMSSystemResources/%s/JMSResource/%s' % (jsmodule["name"],jsmodule["name"]))
if resource["type"]=="connectFactory":
cmo.createConnectionFactory('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setJNDIName('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/SecurityParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setAttachJMSXUserId(false)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/ClientParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setClientIdPolicy('Restricted')
cmo.setSubscriptionSharingPolicy('Exclusive')
cmo.setMessagesMaximum(10)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s/TransactionParams/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"],resource["resourcename"]))
cmo.setXAConnectionFactoryEnabled(true)
cd('/JMSSystemResources/%s/JMSResource/%s/ConnectionFactories/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setDefaultTargetingEnabled(true)
else:
cmo.createUniformDistributedQueue('%s' %resource["resourcename"])
cd('/JMSSystemResources/%s/JMSResource/%s/UniformDistributedQueues/%s' %(jsmodule["name"],jsmodule["name"],resource["resourcename"]))
cmo.setJNDIName('%s' %resource["resourcename"])
cmo.setDefaultTargetingEnabled(true) save()
activate(block="true") create_jmsmodule(ip=sys.argv[1],port=sys.argv[2],filename=sys.argv[3])
创建JDBC
ip="10.199.137.124"
nwport=8001
wwport=9001 nwjdbclist=[{"name":"jdbc/authcDataSource","ip":"10.199.137.123","dbname":"eee","dbuser":"aaaa","dbpasswd":"aaa","targets":["wttyrznw"]},
{"name":"jdbc/gscxDataSource","ip":"10.199.129.45","dbname":"eee","dbuser":"bbb","dbpasswd":"aaa","targets":["wtmhnw","wtwsjsnw","wtwssbnw"]},
{"name":"jdbc/gt3cxDataSource","ip":"10.199.129.45","dbname":"eee","dbuser":"aaa","dbpasswd":"bbbb","targets":["wtjscxnw"]},
{"name":"jdbc/jobNwDataSource","ip":"10.199.137.123","dbname":"eeee","dbuser":"aaa","dbpasswd":"aaaaa","targets":["wtdsrwnw"]},
{"name":"jdbc/NwgyDataSource","ip":"10.199.137.123","dbname":"eee","dbuser":"aaaa","dbpasswd":"bbb","targets":["wtdsrwnw","wtmhnw","wtwsjsnw","wtwssbnw","wtwsznw"]},
{"name":"jdbc/NwnsqdDataSource","ip":"10.199.137.123","dbname":"eeee","dbuser":"aaa","dbpasswd":"bbb","targets":["wtwsznw"]},
{"name":"jdbc/userbindDataSource","ip":"10.199.137.123","dbname":"rrrr","dbuser":"rrrr","dbpasswd":"","targets":["wtmhnw"]},
{"name":"jdbc/userDataSource","ip":"10.199.137.123","dbname":"tttt","dbuser":"","dbpasswd":"","targets":["wtmhnw","wtwsjsnw","wtwssbnw"]},
{"name":"jdbc/WsjsnwDataSource","ip":"10.199.137.123","dbname":"eeeee","dbuser":"eeee","dbpasswd":"wwww","targets":["wtwsjsnw"]},
{"name":"jdbc/WssbnwDataSource","ip":"10.199.137.123","dbname":"","dbuser":"","dbpasswd":"","targets":["wtwssbnw"]}
] def create_jdbc(port,jdbclist):
connect('weblogic', 'aaaaaa', 't3://%s:%s' % (ip,port))
edit()
startEdit()
for jdbc in jdbclist:
cd('/')
cmo.createJDBCSystemResource('%s' %jdbc['name']) cd('/JDBCSystemResources/%s/JDBCResource/%s' %(jdbc["name"],jdbc["name"]))
cmo.setName('%s' %jdbc["name"]) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDataSourceParams/%s' %(jdbc["name"],jdbc["name"],jdbc["name"]))
set('JNDINames',jarray.array([String('%s' %jdbc["name"])], String)) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s' %(jdbc["name"],jdbc["name"],jdbc["name"]))
cmo.setUrl('jdbc:oracle:thin:@%s:1521:%s' %(jdbc["ip"],jdbc["dbname"]))
cmo.setDriverName('oracle.jdbc.OracleDriver')
set('Password', '%s' %jdbc["dbpasswd"]) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s/Properties/%s' %(jdbc["name"],jdbc["name"],jdbc["name"],jdbc["name"]))
cmo.createProperty('user') cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s/Properties/%s/Properties/user' %(jdbc["name"],jdbc["name"],jdbc["name"],jdbc["name"]))
cmo.setValue('%s' %jdbc["dbuser"]) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDataSourceParams/%s' %(jdbc["name"],jdbc["name"],jdbc["name"]))
cmo.setGlobalTransactionsProtocol('OnePhaseCommit') cd('/SystemResources/%s' %(jdbc["name"]))
taglist=[]
for tag in jdbc["targets"]:
taglist.append(ObjectName('com.bea:Name=%s,Type=Server' %tag))
set('Targets',jarray.array(taglist,ObjectName)) save()
activate(block="true")
import sys def create_jdbc(ip,port,jdbcname,jdbcip,jdbcdb,jdbcuser,jdbcpass,jdbctarget):
connect('weblogic', 'aaaaa', 't3://%s:%s' % (ip,port))
edit()
startEdit()
cd('/')
flag = getMBean("/JDBCSystemResources/%s/JDBCResource/%s" %(jdbcname,jdbcname))
if not flag:
cmo.createJDBCSystemResource('%s' %jdbcname)
cd('/JDBCSystemResources/%s/JDBCResource/%s' %(jdbcname,jdbcname))
cmo.setName('%s' %jdbcname) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDataSourceParams/%s' %(jdbcname,jdbcname,jdbcname))
set('JNDINames',jarray.array([String('%s' %jdbcname)], String)) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s' %(jdbcname,jdbcname,jdbcname))
cmo.setUrl('jdbc:oracle:thin:@%s:1521:%s' %(jdbcip,jdbcdb))
cmo.setDriverName('oracle.jdbc.OracleDriver')
set('Password', '%s' %jdbcpass) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s/Properties/%s' %(jdbcname,jdbcname,jdbcname,jdbcname))
cmo.createProperty('user') cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDriverParams/%s/Properties/%s/Properties/user' %(jdbcname,jdbcname,jdbcname,jdbcname))
cmo.setValue('%s' %jdbcuser) cd('/JDBCSystemResources/%s/JDBCResource/%s/JDBCDataSourceParams/%s' %(jdbcname,jdbcname,jdbcname))
cmo.setGlobalTransactionsProtocol('OnePhaseCommit') cd('/SystemResources/%s' %(jdbcname))
taglist=jdbctarget.split(",")
relist=[]
for tag in taglist:
relist.append(ObjectName('com.bea:Name=%s,Type=Server' % tag))
set('Targets',jarray.array(relist,ObjectName)) save()
activate(block="true") create_jdbc(ip=sys.argv[1],port=sys.argv[2],jdbcname=sys.argv[3],jdbcip=sys.argv[4],jdbcdb=sys.argv[5],jdbcuser=sys.argv[6],jdbcpass=sys.argv[7],jdbctarget=sys.argv[8])
部署web app
ip="10.199.137.124"
nwport=8001
wwport=9001 nwappdir="/weblogic/user_projects/domains/wtnwgl_domain/app/"
wwappdir="/weblogic/user_projects/domains/wtwwgl_domain/app/" nwapplist=[
("dzswj-authentication-platform.war","wttyrznw"),
("dzswj-user-manager-platform.war","wtmhnw"),
("gt3cx-app-nw-web.war","wtjscxnw"),
("scheduler-nw-web.war","wtdsrwnw"),
("wsjs-app-nw-web.war","wtwsjsnw"),
("wssb-app-nw-web.war","wtwssbnw"),
("wsz-nw-web.war","wtwsznw")
] wwapplist=[
("dzswj-portals-web.war","wtmhww"),
("wsjs-app-ww-web.war","wtwsjsww"),
("wssb-app-ww-web.war","wtwssbww"),
("wsz-ww-web.war","wtwszww")
] def deploy_app(port,applist,wardir):
connect('weblogic', '', 't3://%s:%s' %(ip,port))
for app in applist:
print '******'+app[0]
edit()
startEdit()
cd("/")
deploy(appName="%s" %app[0],path=wardir+app[0],targets=app[1])
startApplication("%s" %app[0])
save()
activate()
调用wlst脚本
5.创建servers
sh /weblogic/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh servers.py 6.创建jms服务器
sh /weblogic/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh jmsserver.py 7.创建jms模块
sh /weblogic/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh jmsmodule.py 8.创建jdbc
sh /weblogic/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh jdbc.py 9.部署web app
sh /weblogic/Oracle/Middleware/wlserver_10.3/common/bin/wlst.sh deploy_apps.py
shell对接收的参数列表进行分别处理
#!/bin/bash DOMAIN_HOME=/weblogic/user_projects/domains
echo $@
let length=$#-
index= applist=()
meta=()
for arg in $@;do
if [[ index -ge length ]];then
meta[${#meta[*]}]=$arg
fi
if [[ index -lt length ]]; then
applist[${#applist[*]}]=$arg
fi
let index++
done echo ${applist[*]}
echo ${meta[*]} for app in ${applist};do
cd $DOMAIN_HOME/$app"_domain"/bin/
chmod +x *.sh
nohup ./startManagedWebLogic.sh $DOMAIN ${meta[]}:${meta[]} >& &
sleep
echo $app"启动完成"
done 调用格式如下
./startapp.sh app1 app2 app3 10.20.0.2
shell对数组的合并和切分
#!/bin/bash declare -A wtnw
declare -A wtww #wtnw 和wtww 必须先declare否则不能正常合并
wtnw=( [wtdsrwnw]="" [wtjscxnw]="" [wtmhnw]="" [wtnwgl]="" [wttyrznw]="" [wtwsjsnw]="" [wtwssbnw]="" [wtwsznw]="" ) wtww=( [wtwwgl]="" [wtmhww]="" [wtwsjsww]="" [wtwssbww]="" [wtwszww]="" ) #domainport不要先定义必须要直接赋值初始化
domainport=( ${!wtnw[*]} ${!wtww[*]} )
echo ${domainport[*]} echo "合并普通数组"
array2=('','','')
array4=('','','')
array5=($array2,$array4)
echo ${array5[*]} echo "输出数组元素"
for i in ${domainport[*]};do
echo $i
done echo "输出数组索引"
for i in ${!domainport[*]};do
echo $i
done
根据用户操作自动生成wlst脚本
weblogic使用wlst脚本实现自动部署的更多相关文章
- shell脚本编写-自动部署及监控
1.编写脚本自动部署反向代理.web.nfs: I.部署nginx反向代理两个web服务,调度算法使用加权轮询 II.所有web服务使用共享存储nfs,保证所有web都对其有读写权限,保证数据一致性: ...
- Shell脚本——DNS自动部署
详细说明查看: (一)跟我一起玩Linux网络服务:DNS服务——BIND(/etc/named.conf./var/named)设置实现和解释 #! /bin/bash IP="10.10 ...
- Shell脚本——DHCP自动部署
详细说明参考: (三)跟我一起玩Linux网络服务:DHCP服务配置之主服务器配置 #! /bin/bash IPSAG="10.10.10" DNSIP="10.10. ...
- 使用Ansible进行项目的自动部署(Tomcat、Weblogic)
原文:https://github.com/x113773/testall/issues/4 问题:Weblogic/Tomcat 通过JAVA直接远程调用或者调用本地Shell还是通过Ansible ...
- 做了一个简易的git 代码自动部署脚本
做了一个简易的git 代码自动部署脚本 http://my.oschina.net/caomenglong/blog/472665 发表于2个月前(2015-06-30 21:08) 阅读(200 ...
- linux下实现自动部署tomcat的脚本
linux下实现自动部署tomcat的脚本 由于经常部署war到tomccat上,经常有一些重复的工作要做:停服务.备份war包.上传新的war包.启动服务.索性就写了一个自动部署的脚本. 脚本如下a ...
- 自动部署Nginx和nfs并架设Nginx集群脚本
本人经过多次尝试,简单完成了自动部署Nginx和nfs脚本,并且能够自动部署web反向代理集群,下面详细的阐述一下本人的思路.(以下脚本本人处于初学阶段,写的并不是很完善,所以需要后期进行整理和修正, ...
- 吻逗死(windows)系统下自动部署脚本(for java spring*)及linux命令行工具
转载请注明出处:https://www.cnblogs.com/funnyzpc/p/10051647.html (^^)(^^)自動部署腳本原本在上個公司就在使用,由於近期同事需要手動部署一個Spr ...
- 脚本自动部署及监控 web
1.编写脚本自动部署反向代理.web.nfs: I.部署nginx反向代理两个web服务,调度算法使用加权轮询 II.所有web服务使用共享存储nfs,保证所有web都对其有读写权限,保证数据一致性: ...
随机推荐
- 初学者如何理解tomcat服务器?
Tomcat介绍:Tomcat服务器是一个免费的开放源代码的Web应用服务器.当配置正确时,Apache为HTML页面服务,而Tomcat实际上运行JSP页面和Servlet.另外,Tomcat和II ...
- webstorm主要快捷键
1. 必备快捷键 Ctrl+/:注释当前行 F11:全屏 Alt+数字:切换打开第N个文件 Ctrl+Shift+P:打开命令面板 Ctrl+P:搜索项目中的文件 Ct ...
- HTML5+CSS3点击指定按钮显示某些内容效果
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- JSONP ---------跨域
什么是跨域 JavaScript出于安全方面的考虑,不允许跨域调用其他页面的对象.但在安全限制的同时也给注入iframe或是ajax应用上带来了不少麻烦.这里把涉及到跨域的一些问题简单地整理一下: 首 ...
- 无法执行该VI,必须使用LabVIEW完整版开发系统才可以解决该错误
该错误99%是因为你在某个vi中使用了外部系统组件,比如api,.net组件,ActiveX组件,com组件,所有不是Labview原生的接口,在你打包后,在其他没有安装这些组件的电脑上运行,就会出现 ...
- win10运行LoadRunner Controller遇到的坑
第一次在win10上运行性能测试,结果 解决方法: 后来在同事的win10电脑上安装lr11后,竟然可以运行成功,哈哈,看到希望了,不用再安装回win7了,发现他的系统版本是win10企业版,而我的是 ...
- chromedriver与chrome版本映射表
问题: 利用selenium调用谷歌浏览器时报错,后发现是由于浏览器与浏览器驱动不匹配造成的 C:\Users\\Desktop\selenium>python chrome.py[9956:6 ...
- HDU 4283 You Are the One 【区间DP】
<题目链接> 题目大意: 有$n$个人排成一排要上台表演,每个人有一个屌丝值$pi$.第i个上台表演的人,他的不满意度为$(i-1)*p_i$.现在有一个类似于栈的黑屋子,你可以让某些人进 ...
- MyBatis入门(一)SqlSessionFactory
(1)新建数据库 CREATE TABLE emp ( id INT ( 10 ) PRIMARY KEY auto_increment, last_name VARCHAR(255), gender ...
- sql测验,like 和 = 的区别
.SQL 指的是? 您的回答:Structured Query Language .哪个 SQL 语句用于从数据库中提取数据? 您的回答:SELECT .哪条 SQL 语句用于更新数据库中的数据? 您 ...