-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
206 lines (196 loc) · 24.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<!DOCTYPE html><html lang="zh-CN"><head><meta name="generator" content="Hexo 3.9.0"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"><meta content="yes" name="apple-mobile-web-app-capable"><meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"><meta content="telephone=no" name="format-detection"><meta name="description" content="欢迎来到晋的博客,本博客用来收录平时学习笔记,欢迎访问"><title>重新学习JDBC之获取连接 | ZJ_BLOG</title><link rel="stylesheet" type="text/css" href="/css/style.css?v=0.0.1"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/normalize/7.0.0/normalize.min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/pure-min.css"><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/pure/1.0.0/grids-responsive-min.css"><link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"><script type="text/javascript" src="//cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script><link rel="Shortcut Icon" type="image/x-icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="apple-touch-icon-precomposed" href="/apple-touch-icon.png"><script type="text/javascript" src="http://p18j2ow6f.bkt.clouddn.com/static/css/instantclick.min.js"></script><script>InstantClick.init();
InstantClick.on('change', function (isInitialLoad) {
if (isInitialLoad === false) {
if (typeof MathJax !== 'undefined') // support MathJax
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
if (typeof prettyPrint !== 'undefined') // support google code prettify
prettyPrint();
if (typeof _hmt !== 'undefined') // support 百度统计
_hmt.push(['_trackPageview', location.pathname + location.search]);
if (typeof ga !== 'undefined') // support google analytics
ga('send', 'pageview', location.pathname + location.search);
}
});
</script><link rel="alternate" type="application/atom+xml" href="/atom.xml"></head><body><div class="body_container"><div id="header"><div class="site-name"><h1 class="hidden">重新学习JDBC之获取连接</h1><a id="logo" href="/.">ZJ_BLOG</a><p class="description">Silence的博客</p></div><div id="nav-menu"><a class="current" href="/."><i class="fa fa-home"> 首页</i></a><a href="/archives/"><i class="fa fa-archive"> 归档</i></a></div></div><div class="pure-g" id="layout"><div class="pure-u-1 pure-u-md-3-4"><div class="content_container"><div class="post"><h1 class="post-title">重新学习JDBC之获取连接</h1><div class="post-meta">Feb 6, 2017<span> | </span><span class="category"><a href="/categories/JDBC/">JDBC</a></span></div><div class="post-content"><p><strong>JDBC是一种用于执行sql语句的javaAPI, 为多种关系数据库提供统一访问有java编写的类和接口组成</strong></p>
<p>jdbc其实就是一种规范(基准),根据其可以自己构建更高级的框架,如(hibernate等),<br>编程人员须根据这个规范编写来操作数据库</p>
<hr>
<a id="more"></a>
<h2 id="gt-Driver-提供了一个接口-数据库厂商需要自己的产品编写此接口的实现类-通过创建实现类的对象-注册-加载相应的数据库驱动"><a href="#gt-Driver-提供了一个接口-数据库厂商需要自己的产品编写此接口的实现类-通过创建实现类的对象-注册-加载相应的数据库驱动" class="headerlink" title=">Driver 提供了一个接口 数据库厂商需要自己的产品编写此接口的实现类 通过创建实现类的对象(注册)加载相应的数据库驱动"></a>><strong>Driver</strong> 提供了一个接口 数据库厂商需要自己的产品编写此接口的实现类 通过创建实现类的对象(注册)加载相应的数据库驱动</h2><h2 id="1-原始的jdbc尝试-获取数据库连接"><a href="#1-原始的jdbc尝试-获取数据库连接" class="headerlink" title="1,原始的jdbc尝试(获取数据库连接)"></a><em>1,原始的jdbc尝试(获取数据库连接)</em></h2><blockquote>
<p><em>连接需要某个厂商的数据库驱动包 这里连接mysql<br>官网下载地址 <a href="https://dev.mysql.com/downloads/connector/j/" target="_blank" rel="noopener">https://dev.mysql.com/downloads/connector/j/</a> 里面的 mysql-connector-java-</em>.jar文件</p>
</blockquote>
<pre><code> @Test
public void testDriver() throws SQLException {
//创建Driver实现类(这里是mysql的实现类) 同时注册驱动(见下面mysql源码参照1)
Driver driver = new com.mysql.jdbc.Driver();
//Properties类用于读取java的配置文件(.properties) 这里并没有读取文件
String url = "jdbc:mysql://127.0.0.1:3306/test"; //数据库地址
Properties properties = new Properties();
properties.put("user", "root"); //数据库用户名
properties.put("password", "anyao112233");//数据库密码
//获取数据库连接 返回一个Connection的mysql的实现类
Connection connection = driver.connect(url, properties);//见下面源码参照2
System.out.println(connection);
}
</code></pre><blockquote>
<p><em>mysql的源码参照1</em></p>
</blockquote>
<pre><code>package com.mysql.jdbc;
//一旦声明了此类的对象就会先调用这里静态代码块中的代码 实现驱动的注册(registerDriver)
public class Driver extends NonRegisteringDriver implements java.sql.Driver {
public Driver() throws SQLException {
}
static {
try {
//其实在注册的时候就已经实例化过一次driver对象 不需要自己new或newInstance
//但是,由于此实例化为匿名,so只能自己再实例一遍,以获得实例化的对象
DriverManager.registerDriver(new Driver());
} catch (SQLException var1) {
throw new RuntimeException("Can\'t register driver!");
}
}
}
</code></pre><blockquote>
<p><em>mysql的源码参照2</em></p>
</blockquote>
<pre><code>package com.mysql.jdbc;
public class NonRegisteringDriver implements Driver {
public Connection connect(String url, Properties info) throws SQLException {
//检测url是否为空(现在URL是jdbc:mysql://127.0.0.1:3306/test)
if(url != null) {
//检测url是否以后者开头---否
if(StringUtils.startsWithIgnoreCase(url, "jdbc:mysql:loadbalance://")) {
return this.connectLoadBalanced(url, info);
}
//检测url是否以后者开头---否
if(StringUtils.startsWithIgnoreCase(url, "jdbc:mysql:replication://")) {
return this.connectReplicationConnection(url, info);
}
}
Properties props = null;
//获取url中信息存放到props对象中(HOST,user,password,DBNAME)
if((props = this.parseURL(url, info)) == null) {
return null;
} else {
try {
//以props中的信息创建数据库连接 返回代表连接的对象
com.mysql.jdbc.Connection ex = ConnectionImpl.getInstance(this.host(props), this.port(props), props, this.database(props), url);
//返回连接对象
return ex;
//下面是各种异常
} catch (SQLException var6) {
throw var6;
} catch (Exception var7) {
SQLException sqlEx = SQLError.createSQLException(Messages.getString("NonRegisteringDriver.17") + var7.toString() + Messages.getString("NonRegisteringDriver.18"), "08001");
sqlEx.initCause(var7);
throw sqlEx;
}
}
}
}
</code></pre><h2 id="各位看官-自己可以debug调试看看流程-其实也不难看懂-人家的代码都写得很清楚了"><a href="#各位看官-自己可以debug调试看看流程-其实也不难看懂-人家的代码都写得很清楚了" class="headerlink" title="各位看官, 自己可以debug调试看看流程 其实也不难看懂,人家的代码都写得很清楚了"></a><em>各位看官, 自己可以debug调试看看流程 其实也不难看懂,人家的代码都写得很清楚了</em></h2><h2 id="2-升级版本"><a href="#2-升级版本" class="headerlink" title="2,升级版本"></a><strong>2,升级版本</strong></h2><p>配置文件内容<br><img src="http://www.zj2626.github.io/wp-content/uploads/2017/02/aaa.png" alt>(如图,地址要加字符编码,防止中文乱码)</p>
<pre><code>@Test
public void test2() {
getConnection();
}
//把获取数据库连接封装为一个类,把数据库的信息存放到配置文件中
//原因:一般程序部署以后就不会再更改代码,如果数据有变,就可以只是更改配置文件,
// 而要是这些信息放在代码中,则需要重新编译运行才能生效
private Connection getConnection() {
String dirverClass;
String url;
String user;
String password;
//读取文件
//getClassLoader返回类的类加载器
//getResourceAsStream把指定目录的内容返回到一个输入流中
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("com/jdbc/jdbc.properties");
Properties properties = new Properties();
try {
//读取输入流中的内容到properties对象中
properties.load(inputStream);
} catch (IOException e) {
e.printStackTrace();
}
//按照键值对的形式读取对象中该键所对应的值 获取到数据库信息
dirverClass = properties.getProperty("driver");
url = properties.getProperty("jdbc_url");
user = properties.getProperty("user");
password = properties.getProperty("password");
Properties info = new Properties();
info.put("user", user);
info.put("password", password);
Driver driver;
Connection connection = null;
try {
//forName用于使JVM加载指定的类(全类名,写在配置文件中),即动态加载和创建Class 对象
//所有类都是Class类的对象
//通过刚才加载的Class对象(也就是你需要的)来实例化加载了的所需类的对象,效果同new一个对象
driver = (Driver) Class.forName(dirverClass).newInstance();
//获取连接
connection = driver.connect(url, info);
System.out.println(connection);
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException | SQLException e) {
e.printStackTrace();
} finally {
if (connection != null) {
try {
connection.close();//关闭连接
} catch (SQLException e) {
e.printStackTrace();
}
}
}
return null;
}
</code></pre><hr>
<h2 id="3-再次升级版本"><a href="#3-再次升级版本" class="headerlink" title="3,再次升级版本"></a><strong>3,再次升级版本</strong></h2><p>此时发现,通过Driver类直接控制数据库连接太麻烦,于是有了DriverManager</p>
<blockquote>
<p>DriverManager用来管理数据库中所有的驱动程序,把driver的创建,获取连接等过程交由DriverManager管理</p>
</blockquote>
<pre><code>@Test
public void test() {
Properties properties = new Properties();
try {
properties.load(this.getClass().getClassLoader().getResourceAsStream("com/jdbc/jdbc.properties"));
} catch (IOException e) {
e.printStackTrace();
}
String dirverClass = properties.getProperty("driver");
String url = properties.getProperty("jdbc_url");
String user = properties.getProperty("user");
String password = properties.getProperty("password");
Connection connection = null;
try {
//加载数据库驱动 可以多个驱动程序注册(在注册时候就已经实例化了一个对象,不需要自己新建driver对象)
Class.forName(dirverClass);
//获取数据库连接
//获取的时候会扫描所有的注册的驱动 找到合适的驱动然后获取连接
connection = DriverManager.getConnection(url, user, password);
System.out.println(connection);
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
}
</code></pre></div><script type="text/javascript" src="/js/share.js?v=0.0.1" async></script><a class="article-share-link" data-url="http://zj2626.github.io/2017/02/06/2017_jdbc_getConnection/" data-id="ckm3iqts2008kfcuje80lf8ee" data-qrcode="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMYAAADGCAAAAACs8KCBAAACLklEQVR42u3aS3KDQAxFUe9/02QBDuQ+qUlVqy8jl4OBw0DR7/PBx/V13J2Tnv/917vzFxwyZMjYlnE9Hne35A/Nr0+ufPtqZMiQcQCDBFAeKMn5JASTZ5MhQ4aM588ksBIY+ZUMGTJk1Bjklv2qU4YMGTL6RWatGK59v6AWlyFDxoYMHhz///Mr8w0ZMmRsxbjCg5egvN2WDhJ+uYsMGTJGM3iA4w+3tt3Gn0eGDBlTGXxJgnzP18h4IohgMmTIGM3orDjUKmY+AEhDtgwZMqYyeLrWCdP8NaFRpQwZMo5k8DEhuuhjgO4E3NuXKEOGjNGMtBHGG/c8lVw21JQhQ8ZQRi3g1tpnNTD6lQwZMkYzeGu+9rhxcz9svcmQIeMERm21qz82qLXk4vJVhgwZIxhpWkbA6ZoXaeoVa3EZMmQcwODpWmdFrNOM++O/hwwZMkYwOmPLdAksLZjjUCtDhoyhjFo7jN/4vWULGTJknMmopYBvlK98vUyGDBknM2pjSLJCwceT8RhVhgwZBzD4whZpnHVeAQ/EQUUuQ4aMEQxSFfJwTEri9PwgNZQhQ8YgxhUeJOHjDbU0+MZJoQwZMkYw+sPI/qJqumDRGmbIkCFjW0YaZPkyBL9yGrJvM1wZMmSMZtS2FzqLF/x1oMacDBkyZOD0Li1fSVBGVBkyZMhYVB+/l2LKkCHjBMaqIWVtzYuvcSxot8mQIWNDBi8d+Y0JshN8i4NMGTJk7Mf4AW6P2xlqhmmiAAAAAElFTkSuQmCC">分享</a><div class="tags"><a href="/tags/JDBC/">JDBC</a></div><div class="post-nav"><a class="pre" href="/2017/02/07/2017_jdbc_curd/">重新学习JDBC之获取连接</a><a class="next" href="/2017/02/06/2017_jdbc_getStatement/">重新学习JDBC之获取statement</a></div><div id="container"></div><link rel="stylesheet" href="/css/default.css?v=0.0.1"><script src="/js/gitment.browser.js?v=0.0.1"></script><script>var gitment = new Gitment({
owner: 'zj2626',
repo: 'zj2626.github.io',
oauth: {
client_id: '22769c7edffa5f05d10d',
client_secret: '7bac8fc03397cb64c178fbdfe3a01d2abb459704',
},
})
gitment.render('container')
</script></div></div></div><div class="pure-u-1 pure-u-md-1-4"><div id="sidebar"><div class="widget"><div class="search-form"><input id="local-search-input" placeholder="Search" type="text" name="q" results="0"><div id="local-search-result"></div></div></div><div class="widget"><div class="widget-title"><i class="fa fa-folder-o"> 分类</i></div><ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/BUG解决/">BUG解决</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/DOM操作/">DOM操作</a><span class="category-list-count">6</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/DOM操作/XML/">XML</a><span class="category-list-count">6</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/Git/">Git</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/JDBC/">JDBC</a><span class="category-list-count">8</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Linux/">Linux</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/java虚拟机/">java虚拟机</a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/java语言基础/">java语言基础</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/python/">python</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/多线程/">多线程</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库/">数据库</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据库连接池/">数据库连接池</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/数据结构和算法/">数据结构和算法</a><span class="category-list-count">16</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/机器学习/">机器学习</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/框架相关/">框架相关</a><span class="category-list-count">6</span><ul class="category-list-child"><li class="category-list-item"><a class="category-list-link" href="/categories/框架相关/前端技术/">前端技术</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/框架相关/权限管理/">权限管理</a><span class="category-list-count">1</span></li></ul></li><li class="category-list-item"><a class="category-list-link" href="/categories/正则/">正则</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/爬虫/">爬虫</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/程序安装与配置/">程序安装与配置</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/计算机网络/">计算机网络</a><span class="category-list-count">1</span></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-star-o"> 标签</i></div><div class="tagcloud"><a href="/tags/C3P0/" style="font-size: 15px;">C3P0</a> <a href="/tags/深入了解java虚拟机/" style="font-size: 15px;">深入了解java虚拟机</a> <a href="/tags/Hexo优化/" style="font-size: 15px;">Hexo优化</a> <a href="/tags/HTML/" style="font-size: 15px;">HTML</a> <a href="/tags/iframe/" style="font-size: 15px;">iframe</a> <a href="/tags/Maven/" style="font-size: 15px;">Maven</a> <a href="/tags/C语言/" style="font-size: 15px;">C语言</a> <a href="/tags/jenkins/" style="font-size: 15px;">jenkins</a> <a href="/tags/Git/" style="font-size: 15px;">Git</a> <a href="/tags/maven/" style="font-size: 15px;">maven</a> <a href="/tags/junit/" style="font-size: 15px;">junit</a> <a href="/tags/定义/" style="font-size: 15px;">定义</a> <a href="/tags/python/" style="font-size: 15px;">python</a> <a href="/tags/转码/" style="font-size: 15px;">转码</a> <a href="/tags/正则表达式/" style="font-size: 15px;">正则表达式</a> <a href="/tags/Dom4j/" style="font-size: 15px;">Dom4j</a> <a href="/tags/爬虫/" style="font-size: 15px;">爬虫</a> <a href="/tags/常用命令/" style="font-size: 15px;">常用命令</a> <a href="/tags/shell/" style="font-size: 15px;">shell</a> <a href="/tags/XPath/" style="font-size: 15px;">XPath</a> <a href="/tags/Mongodb/" style="font-size: 15px;">Mongodb</a> <a href="/tags/java/" style="font-size: 15px;">java</a> <a href="/tags/mysql/" style="font-size: 15px;">mysql</a> <a href="/tags/存储过程/" style="font-size: 15px;">存储过程</a> <a href="/tags/DBCP/" style="font-size: 15px;">DBCP</a> <a href="/tags/DRUID/" style="font-size: 15px;">DRUID</a> <a href="/tags/工具类/" style="font-size: 15px;">工具类</a> <a href="/tags/Vue/" style="font-size: 15px;">Vue</a> <a href="/tags/jaxp/" style="font-size: 15px;">jaxp</a> <a href="/tags/CRUD/" style="font-size: 15px;">CRUD</a> <a href="/tags/JDBC/" style="font-size: 15px;">JDBC</a> <a href="/tags/Blob/" style="font-size: 15px;">Blob</a> <a href="/tags/sax/" style="font-size: 15px;">sax</a> <a href="/tags/事务/" style="font-size: 15px;">事务</a> <a href="/tags/机器学习/" style="font-size: 15px;">机器学习</a> <a href="/tags/注解/" style="font-size: 15px;">注解</a> <a href="/tags/元数据/" style="font-size: 15px;">元数据</a> <a href="/tags/Hibernate/" style="font-size: 15px;">Hibernate</a> <a href="/tags/Mybatis/" style="font-size: 15px;">Mybatis</a> <a href="/tags/ThreadLocal/" style="font-size: 15px;">ThreadLocal</a> <a href="/tags/逻辑回归/" style="font-size: 15px;">逻辑回归</a> <a href="/tags/Shiro/" style="font-size: 15px;">Shiro</a></div></div><div class="widget"><div class="widget-title"><i class="fa fa-file-o"> 最近文章</i></div><ul class="post-list"><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/2018031301/">使用多种算法对泰坦尼克号乘客获救原因进行分析</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/2018031202/">关于使用sklearn进行数据预处理-归一化/标准化/正则化(转)</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/2018031201/">scikit-learn数据预处理fit_transform()与transform()的区别(转)</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/2018030701/">构建逻辑回归模型实例</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171225_regular/">正则表达式</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171222_crawler4/">Python 爬虫实战(4)</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171219_python_error/">TypeError, a bytes-like object is required, not 'str'</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171219_crawler3/">Python 爬虫实战(3)</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171219_crawler2/">Python 爬虫实战(2)</a></li><li class="post-list-item"><a class="post-list-link" href="/2020/01/15/20171214_crawler/">Python 爬虫实战(1)</a></li></ul></div><div class="widget"><div class="widget-title"><i class="fa fa-external-link"> 友情链接</i></div><ul></ul><a href="https://github.com/zj2626/" title="github" target="_blank">github</a></div></div></div><div class="pure-u-1 pure-u-md-3-4"><div id="footer">Copyright © 2021 <a href="/." rel="nofollow">ZJ_BLOG.</a> Powered by<a rel="nofollow" target="_blank" href="https://hexo.io"> Hexo.</a><a rel="nofollow" target="_blank" href="https://github.com/tufu9441/maupassant-hexo"> Theme</a> by<a rel="nofollow" target="_blank" href="https://github.com/pagecho"> Cho.</a></div></div></div><a class="show" id="rocket" href="#top"></a><script type="text/javascript" src="/js/totop.js?v=0.0.1" async></script><script type="text/javascript" src="//cdn.bootcss.com/fancybox/3.2.5/jquery.fancybox.min.js" async></script><script type="text/javascript" src="/js/fancybox.js?v=0.0.1" async></script><link rel="stylesheet" type="text/css" href="//cdn.bootcss.com/fancybox/3.2.5/jquery.fancybox.min.css"><script type="text/javascript" src="/js/search.js?v=0.0.1"></script><script>var search_path = 'search.xml';
if (search_path.length == 0) {
search_path = 'search.xml';
}
var path = '/' + search_path;
searchFunc(path, 'local-search-input', 'local-search-result');
</script><script>var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = '//hm.baidu.com/hm.js?' + 'c9a692191e9aca9e30daa3f6326cc789';
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script><script type="text/javascript" src="/js/codeblock-resizer.js?v=0.0.1"></script><script type="text/javascript" src="/js/smartresize.js?v=0.0.1"></script></div></body></html>