JavaWeb_(Struts2框架)Ognl小案例查询帖子
此系列博文基于同一个项目已上传至github 传送门
JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门
JavaWeb_(Struts2框架)struts.xml核心配置、动态方法调用、结果集的处理 传送门
JavaWeb_(Struts2框架)Log4j的配置以及解决中文乱码 传送门
JavaWeb_(Struts2框架)参数传递之接收参数与传递参数 传送门
JavaWeb_(Struts2框架)Ognl小案例查询帖子 传送门
JavaWeb_(Struts2框架)Action中struts-default下result的各种转发类型 传送门
JavaWeb_(Struts2框架)拦截器interceptor 传送门
创建paste帖子表
CREATE TABLE `strutstest`.`paste` (
`id` VARCHAR(50) NOT NULL,
`answer` INT NULL,
`offer` INT NULL,
`title` VARCHAR(300) NULL,
`content` VARCHAR(300) NULL,
PRIMARY KEY (`id`));
创建paste表.sql
添加假数据
INSERT INTO `strutstest`.`paste` (`id`, `answer`, `offer`, `title`, `content`) VALUES ('', '', '', '1title', '1content');
INSERT INTO `strutstest`.`paste` (`id`, `answer`, `offer`, `title`, `content`) VALUES ('', '', '', '2title', '2content');
INSERT INTO `strutstest`.`paste` (`id`, `answer`, `offer`, `title`, `content`) VALUES ('', '', '', '3title', '3content');
INSERT INTO `strutstest`.`paste` (`id`, `answer`, `offer`, `title`, `content`) VALUES ('', '', '', '4title', '4content');
假数据.sql
创建查询帖子
Dao层
package com.Gary.dao; import java.sql.SQLException;
import java.util.List; import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler; import com.Gary.domain.Paste;
import com.yl.lain.utils.C3p0DataSourceUtils; public class PasteDao { public List<Paste> findAllPaste() throws SQLException { QueryRunner runner = new QueryRunner(C3p0DataSourceUtils.getDataSource());
String sql = "select * from paste"; return runner.query(sql, new BeanListHandler<Paste>(Paste.class));
} }
PasteDao.java
Domain层
package com.Gary.domain; public class Paste { private String id;
private Integer ansnum;
private Integer offer;
private String title;
private String content;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getAnsnum() {
return ansnum;
}
public void setAnsnum(Integer ansnum) {
this.ansnum = ansnum;
}
public Integer getOffer() {
return offer;
}
public void setOffer(Integer offer) {
this.offer = offer;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
} }
Paste.java
Service层
package com.Gary.service; import java.sql.SQLException;
import java.util.List; import com.Gary.dao.PasteDao;
import com.Gary.domain.Paste; public class PasteService { public List<Paste> findAllPaste() throws SQLException {
PasteDao pasteDao = new PasteDao();
return pasteDao.findAllPaste(); } }
PasteService.java
Web层
package com.Gary.web; import java.util.List; import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.Gary.domain.Paste;
import com.Gary.service.PasteService; public class PasteAction extends ActionSupport{ public String getAllPaste() throws Exception { PasteService pasteService = new PasteService();
List<Paste> pasteList = pasteService.findAllPaste(); ActionContext.getContext().put("pasteList", pasteList);
System.out.println(pasteList); return "index";
} }
PasteAction.java
struts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd"> <struts> <constant name="struts.devMode" value="true"></constant>
<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant> <!-- name:配置包名 namespace:给action的访问路径定义一个命名空间 -->
<package name="MyPackage" namespace="/" extends="struts-default">
<!-- 增加动态方法调用的安全性 -->
<global-allowed-methods>regex:.*</global-allowed-methods> <!-- action:配置action类
name:决定了action访问的资源名称 servlet:url-pattern
class:action的完整类名
method:指定调用action中的哪个方法来去处理请求 --> <action name="LoginAction_*" class="com.Gary.web.UserAction" method="{1}">
<!-- 默认为转发 redirect设置为重定向 -->
<result name="success" type="redirect">/index.html</result>
<!-- 默认为转发 -->
<result name="error">/login.jsp</result>
</action> <action name="LoginActionDefault" class="com.Gary.web.DefaultAction" method="execute"> </action> <action name="LoginActionImpl_*" class="com.Gary.web.ImplAction" method="{1}">
<!-- 转发到LoginActionDefault -->
<result name="defaultAction" type="chain">LoginActionDefault</result>
<!-- 重定向到Action(LoginAction_*) -->
<result name="toLogin" type="redirectAction">
<param name="actionName">LoginAction_login</param> <param name="username">${username}</param>
<param name="password">${password}</param>
</result>
</action>
</package> <package name="PastePackage" namespace="/" extends="struts-default">
<global-allowed-methods>regex:.*</global-allowed-methods>
<action name="PasteAction_*" class="com.Gary.web.PasteAction" method="{1}">
<result name="index">/index.jsp</result>
</action> </package> </struts>
struts.xml
可以看到查询到4条帖子假数据,这4条数据已经通过ActionContext.getContext().put("pasteList", pasteList)存放到ActionContext域中。
接下来通过Ognl与Struct标签,将帖子在前端动态的显示出来
<s:iterator value="pasteList" var="paste"></s:iterator>
<s:property value="ansnum" />
如果要访问的数据是包装类型,我们要加#
<s:property value="#user.username"/>
<s:if test="ansnum%2==0"></s:if>
<s:else></s:else>
在index.jsp首页头部引入JSTL标签库
<%@taglib uri="/struts-tags" prefix="s"%>
循环数据库中帖子表所有的数据
<s:iterator value="pasteList" var="paste"></s:iterator> <s:property value="ansnum" />
<s:iterator value="pasteList" var="paste">
<div class="dvques">
<div class="quesCount">
<div class="count"><s:property value="id"/></div>
<div class="ques">回答数</div>
</div>
<div class="quesContent">
<div class="quesTitle">
<s:property value="offer"/>
<image src="data:images/bean.jpg" class="bean"> <span
class="spanques"><s:property value="title"/></span>
</div>
<div class="qContent"><s:property value="content"/></div>
<div class="tags">
<span class="tag">excel</span><span class="tag">程序</span>
</div>
<div class="quesUser">
<image src="data:images/0.gif" class="imguser" />
<div class="userName">
张大值
<div class="liulan">浏览(9) 30分钟前</div>
</div> </div>
</div>
</div>
</s:iterator>
通过访问http://localhost:8080/StrutsForum_Login/PasteAction_getAllPaste可以将数据库Paste帖子表的数据展示到首页index.jsp中
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<div class="dvhead">
<div class="dvlogo">
<a href="index.html">你问我答</a>
</div>
<div class="dvsearch">10秒钟注册账号,找到你的同学</div>
<div class="dvreg">
已有账号,立即 <a href="login.html">登录</a>
</div>
</div>
<div class="dvContent">
<div class="dvquesleft"> <div class="dvqstitle">
<image class="imgbean" src="data:images/bean.jpg"> <span class="qsTitle">问答</span> <span class="back"><ab href="">《《返回上一页</a></span>
</div>
<div class="dvtabhead">
<div class="tabheads tabcurrent">全部问题</div>
<div class="tabheads">我的问题</div>
<div class="tabheads">关注问题</div>
<div class="tabheads">问题标签</div>
</div>
<div class="tabContent">
<div class="dvtags">
<a class="curenttag">待解决</a><span class="line"></span><a>高分</a><span class="line"></span><a>新回答</a><span class="line"></span><a>已解决</a>
</div>
<div class="tab">
<s:iterator value="pasteList" var="paste">
<div class="dvques">
<div class="quesCount">
<div class="count"><s:property value="id"/></div>
<div class="ques">回答数</div>
</div>
<div class="quesContent">
<div class="quesTitle">
<s:property value="offer"/>
<image src="data:images/bean.jpg" class="bean"> <span
class="spanques"><s:property value="title"/></span>
</div>
<div class="qContent"><s:property value="content"/></div>
<div class="tags">
<span class="tag">excel</span><span class="tag">程序</span>
</div>
<div class="quesUser">
<image src="data:images/0.gif" class="imguser" />
<div class="userName">
张大值
<div class="liulan">浏览(9) 30分钟前</div>
</div> </div>
</div>
</div>
</s:iterator> </div>
<div class="tab hidden">2</div>
<div class="tab hidden">3</div>
<div class="tab hidden">4</div>
</div>
</div>
<div class="dvquesright">
<div>
<buton class="btnques" onclick="location.href='add.html'">提个问题</buton>
</div>
<div class="dvorder">
<div class="orderTitle">专家排行榜</div>
<div class="users">
<image class="userface" src="data:images/0.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/1.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/2.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/3.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/4.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/5.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/6.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div> </div> </div> </div>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function()
{ $(".tabheads").click(function()
{
$(".tabheads").removeClass("tabcurrent").eq($(this).index()).addClass("tabcurrent");
$(".tab").hide().eq($(this).index()).show();
});
});
</script>
<body>
</body>
</html>
index.jsp
如果我们需要放置的是一个对象
在PasteAction.java中放置一个User对象
User user = new User();
user.setUsername("Gary");
user.setPassword("111"); ActionContext.getContext().put("user", user);
前台通过<s:property value="#user.username"/>访问user中的对象
<div class="quesUser">
<image src="data:images/0.gif" class="imguser" />
<div class="userName">
<s:property value="#user.username"/>
<div class="liulan">浏览(9) 30分钟前</div>
</div>
</div>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="css/index.css">
</head>
<div class="dvhead">
<div class="dvlogo">
<a href="index.html">你问我答</a>
</div>
<div class="dvsearch">10秒钟注册账号,找到你的同学</div>
<div class="dvreg">
已有账号,立即 <a href="login.html">登录</a>
</div>
</div>
<div class="dvContent">
<div class="dvquesleft"> <div class="dvqstitle">
<image class="imgbean" src="data:images/bean.jpg"> <span class="qsTitle">问答</span> <span class="back"><ab href="">《《返回上一页</a></span>
</div>
<div class="dvtabhead">
<div class="tabheads tabcurrent">全部问题</div>
<div class="tabheads">我的问题</div>
<div class="tabheads">关注问题</div>
<div class="tabheads">问题标签</div>
</div>
<div class="tabContent">
<div class="dvtags">
<a class="curenttag">待解决</a><span class="line"></span><a>高分</a><span class="line"></span><a>新回答</a><span class="line"></span><a>已解决</a>
</div>
<div class="tab">
<s:iterator value="pasteList" var="paste">
<div class="dvques">
<div class="quesCount">
<div class="count"><s:property value="id"/></div>
<div class="ques">回答数</div>
</div>
<div class="quesContent">
<div class="quesTitle">
<s:property value="offer"/>
<image src="data:images/bean.jpg" class="bean"> <span
class="spanques"><s:property value="title"/></span>
</div>
<div class="qContent"><s:property value="content"/></div>
<div class="tags">
<span class="tag">excel</span><span class="tag">程序</span>
</div>
<div class="quesUser">
<image src="data:images/0.gif" class="imguser" />
<div class="userName">
<s:property value="#user.username"/>
<div class="liulan">浏览(9) 30分钟前</div>
</div>
</div>
</div>
</div>
</s:iterator> </div>
<div class="tab hidden">2</div>
<div class="tab hidden">3</div>
<div class="tab hidden">4</div>
</div>
</div>
<div class="dvquesright">
<div>
<buton class="btnques" onclick="location.href='add.html'">提个问题</buton>
</div>
<div class="dvorder">
<div class="orderTitle">专家排行榜</div>
<div class="users">
<image class="userface" src="data:images/0.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/1.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/2.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/3.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/4.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/5.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div>
<div class="users">
<image class="userface" src="data:images/6.gif" />
<div class="dvuser">
<div class="userTitle">陈有龙</div>
<div class="userdeital">大牛6级 豆:14006</div>
</div>
</div> </div> </div> </div>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(function()
{ $(".tabheads").click(function()
{
$(".tabheads").removeClass("tabcurrent").eq($(this).index()).addClass("tabcurrent");
$(".tab").hide().eq($(this).index()).show();
});
});
</script>
<body>
</body>
</html>
index.jsp
web层
package com.Gary.web; import java.util.List; import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.Gary.domain.Paste;
import com.Gary.domain.User;
import com.Gary.service.PasteService; public class PasteAction extends ActionSupport{ public String getAllPaste() throws Exception { PasteService pasteService = new PasteService();
List<Paste> pasteList = pasteService.findAllPaste(); User user = new User();
user.setUsername("Gary");
user.setPassword("111"); ActionContext.getContext().put("pasteList", pasteList);
ActionContext.getContext().put("user", user);
System.out.println(pasteList); return "index";
} }
PasteAction.java
service层
package com.Gary.service; import java.sql.SQLException;
import java.util.List; import com.Gary.dao.PasteDao;
import com.Gary.domain.Paste; public class PasteService { public List<Paste> findAllPaste() throws SQLException {
PasteDao pasteDao = new PasteDao();
return pasteDao.findAllPaste(); } }
PasteService.java
domain层
package com.Gary.domain; public class Paste { private String id;
private Integer ansnum;
private Integer offer;
private String title;
private String content;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public Integer getAnsnum() {
return ansnum;
}
public void setAnsnum(Integer ansnum) {
this.ansnum = ansnum;
}
public Integer getOffer() {
return offer;
}
public void setOffer(Integer offer) {
this.offer = offer;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
} }
Paste.java
dao层
package com.Gary.dao; import java.sql.SQLException;
import java.util.List; import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler; import com.Gary.domain.Paste;
import com.yl.lain.utils.C3p0DataSourceUtils; public class PasteDao { public List<Paste> findAllPaste() throws SQLException { QueryRunner runner = new QueryRunner(C3p0DataSourceUtils.getDataSource());
String sql = "select * from paste"; return runner.query(sql, new BeanListHandler<Paste>(Paste.class));
} }
PasteDao.java
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd"> <struts> <constant name="struts.devMode" value="true"></constant>
<constant name="struts.enable.DynamicMethodInvocation" value="true"></constant> <!-- name:配置包名 namespace:给action的访问路径定义一个命名空间 -->
<package name="MyPackage" namespace="/" extends="struts-default">
<!-- 增加动态方法调用的安全性 -->
<global-allowed-methods>regex:.*</global-allowed-methods> <!-- action:配置action类
name:决定了action访问的资源名称 servlet:url-pattern
class:action的完整类名
method:指定调用action中的哪个方法来去处理请求 --> <action name="LoginAction_*" class="com.Gary.web.UserAction" method="{1}">
<!-- 默认为转发 redirect设置为重定向 -->
<result name="success" type="redirect">/index.html</result>
<!-- 默认为转发 -->
<result name="error">/login.jsp</result>
</action> <action name="LoginActionDefault" class="com.Gary.web.DefaultAction" method="execute"> </action> <action name="LoginActionImpl_*" class="com.Gary.web.ImplAction" method="{1}">
<!-- 转发到LoginActionDefault -->
<result name="defaultAction" type="chain">LoginActionDefault</result>
<!-- 重定向到Action(LoginAction_*) -->
<result name="toLogin" type="redirectAction">
<param name="actionName">LoginAction_login</param> <param name="username">${username}</param>
<param name="password">${password}</param>
</result>
</action>
</package> <package name="PastePackage" namespace="/" extends="struts-default">
<global-allowed-methods>regex:.*</global-allowed-methods>
<action name="PasteAction_*" class="com.Gary.web.PasteAction" method="{1}">
<result name="index">/index.jsp</result>
</action> </package> </struts>
struts.xml
JavaWeb_(Struts2框架)Ognl小案例查询帖子的更多相关文章
- JavaWeb_(Struts2框架)拦截器interceptor
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)Action中struts-default下result的各种转发类型
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)参数传递之接收参数与传递参数
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)Log4j的配置以及解决中文乱码
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)struts.xml核心配置、动态方法调用、结果集的处理
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)Struts创建Action的三种方式
此系列博文基于同一个项目已上传至github 传送门 JavaWeb_(Struts2框架)Struts创建Action的三种方式 传送门 JavaWeb_(Struts2框架)struts.xml核 ...
- JavaWeb_(Struts2框架)使用Struts框架实现用户的登陆
JavaWeb_(Struts2框架)使用Servlet实现用户的登陆 传送门 JavaWeb_(Struts2框架)Servlet与Struts区别 传送门 MySQL数据库中存在Gary用户,密码 ...
- JavaWeb_(Struts2框架)使用Servlet实现用户的登陆
JavaWeb_(Struts2框架)使用Struts框架实现用户的登陆 传送门 JavaWeb_(Struts2框架)Servlet与Struts区别 传送门 MySQL数据库中存在Gary用户,密 ...
- 基于Struts2框架实现登录案例 之 使用Struts2标签库简化表单+继承ActionSupport完成输入交验
一,使用Struts2标签库简化表单 在文章[基于Struts2框架实现登录案例]的基础上,通过使用Struts标签库可以简化登录页面login2.jsp <%@ page language=& ...
随机推荐
- 区间dp 括号匹配问题
这道题目能用区间dp来解决,是因为一个大区间的括号匹配数是可以由小区间最优化选取得到(也就是满足最优子结构) 然后构造dp 既然是区间类型的dp 一般用二维 我们定义dp[i][j] 表示i~j这个区 ...
- C C语言中 *.c和*.h文件的区别!
一个简单的问题:.c和.h文件的区别学了几个月的C语言,反而觉得越来越不懂了.同样是子程序,可以定义在.c文件中,也可以定义在.h文件中,那这两个文件到底在用法上有什么区别呢? 2楼:子程序不要定义在 ...
- MVC4学习要点记三
一.数据迁移用来解决code first情况下当增加.删除.改变实体类,或改变DbContext类后,相应地更新数据库结构而不会对现有数据产生影响. 1.启用迁移指令:enable-migration ...
- Tika检测文件类型
Tika类型检测 Tika支持MIME所提供的所有互联网媒体文件类型.每当一个文件通过Tika检测到该文件,其文件类型.检测的介质类型,Tika内部通过以下机制. MIME标准 多用途Internet ...
- java基础3(异常)
1.异常的体系 1)请描述异常的继承体系 异常继承体系为:异常的根类是 java.lang.Throwable,其下有两个子类:java.lang.Error 与 java.util.Exceptio ...
- python之file 方法
file 对象使用 open 函数来创建,下表列出了 file 对象常用的函数: 1 file.close() close() 方法用于关闭一个已打开的文件.关闭后的文件不能再进行读写操作, 否 ...
- canvas签名
<template> <div class="share" style="background:#fff"> <div class ...
- JavaJDBC【五、事务】
概念: 事务(Transaction)作为单个逻辑工作单元执行的一系列操作. 这些操作都是作为一个整体一起向系统提交,要么都执行,要么都不执行. 特点: 原子性:一个完整操作. 一致性:当事务完成时, ...
- Java学习笔记【九、集合框架】
集合框架设计的目标: 高性能. 允许不同类型的集合,以类似的方式工作,有互操作性. 对一个集合的扩展和适应必须简单. 集合框架包含: 接口:代表集合的抽象数据类型. 实现(类):具体实现(ArrayL ...
- SQL语句复习【专题五】
SQL语句复习[专题五] 单行子查询:只会得到一个结果的子查询[子查询的内容必须放在小括号中.在查询语句中的查询语句 ]--查询所有比 CLARK 员工 工资高的员工--1.先查询 CLARK 员工的 ...