Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
梦中观雨
cat
提交
20b4be0c
C
cat
项目概览
梦中观雨
/
cat
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
cat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
20b4be0c
编写于
8月 27, 2012
作者:
Y
Yiming Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JDBC connection support,
上级
6fa03f8c
变更
14
显示空白变更内容
内联
并排
Showing
14 changed file
with
713 addition
and
64 deletion
+713
-64
bee-engine/src/main/java/com/dianping/bee/engine/build/ComponentsConfigurator.java
...com/dianping/bee/engine/build/ComponentsConfigurator.java
+5
-5
bee-engine/src/main/java/com/dianping/bee/engine/spi/internal/DefaultStatementVisitor.java
...ping/bee/engine/spi/internal/DefaultStatementVisitor.java
+3
-1
bee-engine/src/main/java/com/dianping/bee/server/SimpleServer.java
...e/src/main/java/com/dianping/bee/server/SimpleServer.java
+5
-1
bee-engine/src/main/java/com/dianping/bee/server/SimpleServerConnectionFactory.java
...om/dianping/bee/server/SimpleServerConnectionFactory.java
+1
-0
bee-engine/src/main/java/com/dianping/bee/server/handler/SimpleDescHandler.java
...va/com/dianping/bee/server/handler/SimpleDescHandler.java
+1
-1
bee-engine/src/main/java/com/dianping/bee/server/handler/SimpleSelectHandler.java
.../com/dianping/bee/server/handler/SimpleSelectHandler.java
+65
-13
bee-engine/src/main/java/com/dianping/bee/server/handler/SimpleServerQueryHandler.java
...dianping/bee/server/handler/SimpleServerQueryHandler.java
+2
-1
bee-engine/src/main/java/com/dianping/bee/server/handler/SimpleShowHandler.java
...va/com/dianping/bee/server/handler/SimpleShowHandler.java
+78
-1
bee-engine/src/main/java/com/dianping/bee/server/handler/SimpleUseHandler.java
...ava/com/dianping/bee/server/handler/SimpleUseHandler.java
+1
-1
bee-engine/src/main/java/com/dianping/bee/server/parse/SimpleServerParse.java
...java/com/dianping/bee/server/parse/SimpleServerParse.java
+1
-1
bee-engine/src/main/java/com/dianping/bee/server/parse/SimpleServerParseSelect.java
...om/dianping/bee/server/parse/SimpleServerParseSelect.java
+485
-0
bee-engine/src/main/java/com/dianping/bee/server/parse/SimpleServerParseShow.java
.../com/dianping/bee/server/parse/SimpleServerParseShow.java
+50
-24
bee-engine/src/main/resources/META-INF/plexus/components.xml
bee-engine/src/main/resources/META-INF/plexus/components.xml
+14
-14
bee-engine/src/test/java/com/dianping/bee/engine/spi/ServerTest.java
...src/test/java/com/dianping/bee/engine/spi/ServerTest.java
+2
-1
未找到文件。
bee-engine/src/main/java/com/dianping/bee/engine/build/ComponentsConfigurator.java
浏览文件 @
20b4be0c
...
...
@@ -20,12 +20,12 @@ import com.dianping.bee.engine.spi.internal.MultiTableStatementVisitor;
import
com.dianping.bee.engine.spi.internal.SingleTableStatementVisitor
;
import
com.dianping.bee.engine.spi.internal.TableHelper
;
import
com.dianping.bee.server.InformationSchemaDatabase
;
import
com.dianping.bee.server.SimpleDescHandler
;
import
com.dianping.bee.server.SimpleSelectHandler
;
import
com.dianping.bee.server.SimpleServer
;
import
com.dianping.bee.server.SimpleServerQueryHandler
;
import
com.dianping.bee.server.SimpleShowHandler
;
import
com.dianping.bee.server.SimpleUseHandler
;
import
com.dianping.bee.server.handler.SimpleDescHandler
;
import
com.dianping.bee.server.handler.SimpleSelectHandler
;
import
com.dianping.bee.server.handler.SimpleServerQueryHandler
;
import
com.dianping.bee.server.handler.SimpleShowHandler
;
import
com.dianping.bee.server.handler.SimpleUseHandler
;
import
com.site.lookup.configuration.AbstractResourceConfigurator
;
import
com.site.lookup.configuration.Component
;
...
...
bee-engine/src/main/java/com/dianping/bee/engine/spi/internal/DefaultStatementVisitor.java
浏览文件 @
20b4be0c
...
...
@@ -36,8 +36,10 @@ public class DefaultStatementVisitor extends EmptySQLASTVisitor {
@Override
public
void
visit
(
DMLSelectStatement
node
)
{
TableReference
tr
=
node
.
getTables
();
if
(
tr
!=
null
)
{
tr
.
accept
(
this
);
}
}
@Override
public
void
visit
(
TableRefFactor
node
)
{
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleServer.java
浏览文件 @
20b4be0c
...
...
@@ -22,7 +22,11 @@ public class SimpleServer implements LogEnabled {
private
Logger
m_logger
;
public
static
final
String
VERSION
=
"bee-0.0.1-cobar-1.3.0"
;
/**
* The mysql version can not be changed, JDBC Driver will parse mysql major
* and minor version information
*/
public
static
final
String
VERSION
=
"5.1.48-bee-0.0.1"
;
@Override
public
void
enableLogging
(
Logger
logger
)
{
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleServerConnectionFactory.java
浏览文件 @
20b4be0c
...
...
@@ -12,6 +12,7 @@ import com.alibaba.cobar.net.factory.FrontendConnectionFactory;
import
com.alibaba.cobar.server.ServerConnection
;
import
com.alibaba.cobar.server.session.BlockingSession
;
import
com.alibaba.cobar.server.session.NonBlockingSession
;
import
com.dianping.bee.server.handler.SimpleServerQueryHandler
;
/**
* @author <a href="mailto:yiming.liu@dianping.com">Yiming Liu</a>
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleDescHandler.java
→
bee-engine/src/main/java/com/dianping/bee/server/
handler/
SimpleDescHandler.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.handler
;
import
java.nio.ByteBuffer
;
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleSelectHandler.java
→
bee-engine/src/main/java/com/dianping/bee/server/
handler/
SimpleSelectHandler.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.handler
;
import
java.nio.ByteBuffer
;
import
java.sql.SQLSyntaxErrorException
;
...
...
@@ -26,7 +26,6 @@ import com.alibaba.cobar.protocol.mysql.FieldPacket;
import
com.alibaba.cobar.protocol.mysql.ResultSetHeaderPacket
;
import
com.alibaba.cobar.protocol.mysql.RowDataPacket
;
import
com.alibaba.cobar.server.ServerConnection
;
import
com.alibaba.cobar.server.parser.ServerParseSelect
;
import
com.alibaba.cobar.server.response.SelectDatabase
;
import
com.alibaba.cobar.server.response.SelectIdentity
;
import
com.alibaba.cobar.server.response.SelectLastInsertId
;
...
...
@@ -42,6 +41,7 @@ import com.dianping.bee.engine.spi.meta.ColumnMeta;
import
com.dianping.bee.engine.spi.meta.Row
;
import
com.dianping.bee.engine.spi.meta.RowSet
;
import
com.dianping.bee.engine.spi.meta.internal.TypeUtils
;
import
com.dianping.bee.server.parse.SimpleServerParseSelect
;
import
com.site.lookup.annotation.Inject
;
/**
...
...
@@ -103,20 +103,23 @@ public class SimpleSelectHandler {
public
void
handle
(
String
stmt
,
ServerConnection
c
,
int
offs
)
{
int
offset
=
offs
;
switch
(
ServerParseSelect
.
parse
(
stmt
,
offs
))
{
case
ServerParseSelect
.
VERSION_COMMENT
:
switch
(
S
impleS
erverParseSelect
.
parse
(
stmt
,
offs
))
{
case
S
impleS
erverParseSelect
.
VERSION_COMMENT
:
SelectVersionComment
.
response
(
c
);
break
;
case
ServerParseSelect
.
DATABASE
:
case
S
impleS
erverParseSelect
.
DATABASE
:
SelectDatabase
.
response
(
c
);
break
;
case
ServerParseSelect
.
USER
:
case
S
impleS
erverParseSelect
.
USER
:
SelectUser
.
response
(
c
);
break
;
case
ServerParseSelect
.
VERSION
:
case
S
impleS
erverParseSelect
.
VERSION
:
SelectVersion
.
response
(
c
);
break
;
case
ServerParseSelect
.
LAST_INSERT_ID
:
case
SimpleServerParseSelect
.
SESSION
:
selectSession
(
c
,
stmt
);
break
;
case
SimpleServerParseSelect
.
LAST_INSERT_ID
:
// offset = ParseUtil.move(stmt, 0, "select".length());
loop:
for
(;
offset
<
stmt
.
length
();
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
...
...
@@ -131,11 +134,11 @@ public class SimpleSelectHandler {
break
loop
;
}
}
offset
=
ServerParseSelect
.
indexAfterLastInsertIdFunc
(
stmt
,
offset
);
offset
=
ServerParseSelect
.
skipAs
(
stmt
,
offset
);
offset
=
S
impleS
erverParseSelect
.
indexAfterLastInsertIdFunc
(
stmt
,
offset
);
offset
=
S
impleS
erverParseSelect
.
skipAs
(
stmt
,
offset
);
SelectLastInsertId
.
response
(
c
,
stmt
,
offset
);
break
;
case
ServerParseSelect
.
IDENTITY
:
case
S
impleS
erverParseSelect
.
IDENTITY
:
// offset = ParseUtil.move(stmt, 0, "select".length());
loop:
for
(;
offset
<
stmt
.
length
();
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
...
...
@@ -151,9 +154,9 @@ public class SimpleSelectHandler {
}
int
indexOfAtAt
=
offset
;
offset
+=
2
;
offset
=
ServerParseSelect
.
indexAfterIdentity
(
stmt
,
offset
);
offset
=
S
impleS
erverParseSelect
.
indexAfterIdentity
(
stmt
,
offset
);
String
orgName
=
stmt
.
substring
(
indexOfAtAt
,
offset
);
offset
=
ServerParseSelect
.
skipAs
(
stmt
,
offset
);
offset
=
S
impleS
erverParseSelect
.
skipAs
(
stmt
,
offset
);
SelectIdentity
.
response
(
c
,
stmt
,
offset
,
orgName
);
break
;
default
:
...
...
@@ -165,6 +168,55 @@ public class SimpleSelectHandler {
}
}
/**
* @param c
* @param stmt
*/
private
void
selectSession
(
ServerConnection
c
,
String
stmt
)
{
String
sessionVariable
=
stmt
.
substring
(
stmt
.
indexOf
(
"@@session"
));
int
FIELD_COUNT
=
1
;
ResultSetHeaderPacket
header
=
PacketUtil
.
getHeader
(
FIELD_COUNT
);
FieldPacket
[]
fields
=
new
FieldPacket
[
FIELD_COUNT
];
EOFPacket
eof
=
new
EOFPacket
();
int
i
=
0
;
byte
packetId
=
0
;
header
.
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
sessionVariable
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
eof
.
packetId
=
++
packetId
;
ByteBuffer
buffer
=
c
.
allocate
();
// write header
buffer
=
header
.
write
(
buffer
,
c
);
// write fields
for
(
FieldPacket
field
:
fields
)
{
buffer
=
field
.
write
(
buffer
,
c
);
}
// write eof
buffer
=
eof
.
write
(
buffer
,
c
);
// write rows
packetId
=
eof
.
packetId
;
// TODO: sample result currently
RowDataPacket
row
=
new
RowDataPacket
(
FIELD_COUNT
);
row
.
add
(
StringUtil
.
encode
(
"1"
,
c
.
getCharset
()));
row
.
packetId
=
++
packetId
;
buffer
=
row
.
write
(
buffer
,
c
);
// write last eof
EOFPacket
lastEof
=
new
EOFPacket
();
lastEof
.
packetId
=
++
packetId
;
buffer
=
lastEof
.
write
(
buffer
,
c
);
// post write
c
.
write
(
buffer
);
}
/**
*
* @param c
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleServerQueryHandler.java
→
bee-engine/src/main/java/com/dianping/bee/server/
handler/
SimpleServerQueryHandler.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.handler
;
import
org.apache.log4j.Logger
;
...
...
@@ -25,6 +25,7 @@ import com.alibaba.cobar.server.handler.KillHandler;
import
com.alibaba.cobar.server.handler.SavepointHandler
;
import
com.alibaba.cobar.server.handler.SetHandler
;
import
com.alibaba.cobar.server.handler.StartHandler
;
import
com.dianping.bee.server.parse.SimpleServerParse
;
import
com.site.lookup.annotation.Inject
;
/**
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleShowHandler.java
→
bee-engine/src/main/java/com/dianping/bee/server/
handler/
SimpleShowHandler.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.handler
;
import
java.nio.ByteBuffer
;
import
java.util.HashMap
;
...
...
@@ -35,6 +35,7 @@ import com.alibaba.cobar.util.StringUtil;
import
com.dianping.bee.engine.spi.DatabaseProvider
;
import
com.dianping.bee.engine.spi.TableProvider
;
import
com.dianping.bee.engine.spi.TableProviderManager
;
import
com.dianping.bee.server.parse.SimpleServerParseShow
;
import
com.site.lookup.ContainerLoader
;
import
com.site.lookup.annotation.Inject
;
...
...
@@ -67,11 +68,86 @@ public class SimpleShowHandler {
case
SimpleServerParseShow
.
VARIABLES
:
showVariables
(
c
,
stmt
);
break
;
case
SimpleServerParseShow
.
COLLATION
:
showCollation
(
c
,
stmt
);
break
;
default
:
c
.
writeErrMessage
(
ErrorCode
.
ER_UNKNOWN_COM_ERROR
,
"Unsupported show command"
);
}
}
/**
* @param c
* @param stmt
*/
private
void
showCollation
(
ServerConnection
c
,
String
stmt
)
{
int
FIELD_COUNT
=
6
;
ResultSetHeaderPacket
header
=
PacketUtil
.
getHeader
(
FIELD_COUNT
);
FieldPacket
[]
fields
=
new
FieldPacket
[
FIELD_COUNT
];
EOFPacket
eof
=
new
EOFPacket
();
int
i
=
0
;
byte
packetId
=
0
;
header
.
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Collation"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Charset"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Id"
,
Fields
.
FIELD_TYPE_LONG
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Default"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Compiled"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Sortlen"
,
Fields
.
FIELD_TYPE_LONG
);
fields
[
i
++].
packetId
=
++
packetId
;
eof
.
packetId
=
++
packetId
;
ByteBuffer
buffer
=
c
.
allocate
();
// write header
buffer
=
header
.
write
(
buffer
,
c
);
// write fields
for
(
FieldPacket
field
:
fields
)
{
buffer
=
field
.
write
(
buffer
,
c
);
}
// write eof
buffer
=
eof
.
write
(
buffer
,
c
);
// write rows
packetId
=
eof
.
packetId
;
// TODO: sample result currently
// RowDataPacket row = new RowDataPacket(FIELD_COUNT);
// row.add(StringUtil.encode("utf8_general_ci", c.getCharset()));
// row.add(StringUtil.encode("utf8", c.getCharset()));
// row.add(LongUtil.toBytes(33L));
// row.add(StringUtil.encode("Yes", c.getCharset()));
// row.add(StringUtil.encode("Yes", c.getCharset()));
// row.add(LongUtil.toBytes(1));
// row.packetId = ++packetId;
// buffer = row.write(buffer, c);
//
// row = new RowDataPacket(FIELD_COUNT);
// row.add(StringUtil.encode("utf8_bin", c.getCharset()));
// row.add(StringUtil.encode("utf8", c.getCharset()));
// row.add(LongUtil.toBytes(83L));
// row.add(StringUtil.encode("", c.getCharset()));
// row.add(StringUtil.encode("Yes", c.getCharset()));
// row.add(LongUtil.toBytes(1));
// row.packetId = ++packetId;
// buffer = row.write(buffer, c);
// write last eof
EOFPacket
lastEof
=
new
EOFPacket
();
lastEof
.
packetId
=
++
packetId
;
buffer
=
lastEof
.
write
(
buffer
,
c
);
// post write
c
.
write
(
buffer
);
}
/**
* @param c
* @param stmt
...
...
@@ -100,6 +176,7 @@ public class SimpleShowHandler {
int
i
=
0
;
byte
packetId
=
0
;
header
.
packetId
=
++
packetId
;
// FIXME field type need to be updated
fields
[
i
]
=
PacketUtil
.
getField
(
"Name"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
fields
[
i
++].
packetId
=
++
packetId
;
fields
[
i
]
=
PacketUtil
.
getField
(
"Engine"
,
Fields
.
FIELD_TYPE_VAR_STRING
);
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleUseHandler.java
→
bee-engine/src/main/java/com/dianping/bee/server/
handler/
SimpleUseHandler.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.handler
;
import
java.nio.ByteBuffer
;
import
java.util.Set
;
...
...
bee-engine/src/main/java/com/dianping/bee/server/SimpleServerParse.java
→
bee-engine/src/main/java/com/dianping/bee/server/
parse/
SimpleServerParse.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.parse
;
import
com.alibaba.cobar.parser.util.ParseUtil
;
...
...
bee-engine/src/main/java/com/dianping/bee/server/parse/SimpleServerParseSelect.java
0 → 100644
浏览文件 @
20b4be0c
/**
* Project: bee-engine
*
* File Created at 2012-8-27
*
* Copyright 2012 dianping.com.
* All rights reserved.
*
* This software is the confidential and proprietary information of
* Dianping Company. ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only in
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server.parse
;
import
com.alibaba.cobar.parser.util.CharTypes
;
import
com.alibaba.cobar.parser.util.ParseUtil
;
/**
* @author <a href="mailto:yiming.liu@dianping.com">Yiming Liu</a>
*/
public
class
SimpleServerParseSelect
{
public
static
final
int
OTHER
=
-
1
;
public
static
final
int
VERSION_COMMENT
=
1
;
public
static
final
int
DATABASE
=
2
;
public
static
final
int
USER
=
3
;
public
static
final
int
LAST_INSERT_ID
=
4
;
public
static
final
int
IDENTITY
=
5
;
public
static
final
int
VERSION
=
6
;
public
static
final
int
SESSION
=
7
;
private
static
final
char
[]
_SESSION
=
"SESSION"
.
toCharArray
();
private
static
final
char
[]
_VERSION_COMMENT
=
"VERSION_COMMENT"
.
toCharArray
();
private
static
final
char
[]
_IDENTITY
=
"IDENTITY"
.
toCharArray
();
private
static
final
char
[]
_LAST_INSERT_ID
=
"LAST_INSERT_ID"
.
toCharArray
();
private
static
final
char
[]
_DATABASE
=
"DATABASE()"
.
toCharArray
();
/**
* SELECT DATABASE()
*/
static
int
databaseCheck
(
String
stmt
,
int
offset
)
{
int
length
=
offset
+
_DATABASE
.
length
;
if
(
stmt
.
length
()
>=
length
&&
ParseUtil
.
compare
(
stmt
,
offset
,
_DATABASE
))
{
if
(
stmt
.
length
()
>
length
&&
stmt
.
charAt
(
length
)
!=
' '
)
{
return
OTHER
;
}
else
{
return
DATABASE
;
}
}
return
OTHER
;
}
/**
* select @@identity<br/>
* select @@identiTy aS iD
*/
static
int
identityCheck
(
String
stmt
,
int
offset
)
{
offset
=
indexAfterIdentity
(
stmt
,
offset
);
if
(
offset
<
0
)
{
return
OTHER
;
}
offset
=
skipAs
(
stmt
,
offset
);
offset
=
skipAlias
(
stmt
,
offset
);
if
(
offset
<
0
)
{
return
OTHER
;
}
offset
=
ParseUtil
.
move
(
stmt
,
offset
,
0
);
if
(
offset
<
stmt
.
length
())
{
return
OTHER
;
}
return
IDENTITY
;
}
/**
* @param offset
* <code>stmt.charAt(offset) == first '`' OR 'i' OR 'I' OR '\'' OR '"'</code>
* @return index after identity or `identity` or "identity" or 'identity',
* might equals to length. -1 if not identity or `identity` or
* "identity" or 'identity'
*/
public
static
int
indexAfterIdentity
(
String
stmt
,
int
offset
)
{
char
first
=
stmt
.
charAt
(
offset
);
switch
(
first
)
{
case
'`'
:
case
'\''
:
case
'"'
:
if
(
stmt
.
length
()
<
offset
+
"identity"
.
length
()
+
2
)
{
return
-
1
;
}
if
(
stmt
.
charAt
(
offset
+
"identity"
.
length
()
+
1
)
!=
first
)
{
return
-
1
;
}
++
offset
;
break
;
case
'i'
:
case
'I'
:
if
(
stmt
.
length
()
<
offset
+
"identity"
.
length
())
{
return
-
1
;
}
break
;
default
:
return
-
1
;
}
if
(
ParseUtil
.
compare
(
stmt
,
offset
,
_IDENTITY
))
{
offset
+=
_IDENTITY
.
length
;
switch
(
first
)
{
case
'`'
:
case
'\''
:
case
'"'
:
return
++
offset
;
}
return
offset
;
}
return
-
1
;
}
/**
* @param offset
* <code>stmt.charAt(offset) == first 'L' OR 'l'</code>
* @return index after LAST_INSERT_ID(), might equals to length. -1 if not
* LAST_INSERT_ID
*/
public
static
int
indexAfterLastInsertIdFunc
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>=
offset
+
"LAST_INSERT_ID()"
.
length
())
{
if
(
ParseUtil
.
compare
(
stmt
,
offset
,
_LAST_INSERT_ID
))
{
offset
=
ParseUtil
.
move
(
stmt
,
offset
+
_LAST_INSERT_ID
.
length
,
0
);
if
(
offset
+
1
<
stmt
.
length
()
&&
stmt
.
charAt
(
offset
)
==
'('
)
{
offset
=
ParseUtil
.
move
(
stmt
,
offset
+
1
,
0
);
if
(
offset
<
stmt
.
length
()
&&
stmt
.
charAt
(
offset
)
==
')'
)
{
return
++
offset
;
}
}
}
}
return
-
1
;
}
/**
* SELECT LAST_INSERT_ID()
*/
static
int
lastInsertCheck
(
String
stmt
,
int
offset
)
{
offset
=
indexAfterLastInsertIdFunc
(
stmt
,
offset
);
if
(
offset
<
0
)
{
return
OTHER
;
}
offset
=
skipAs
(
stmt
,
offset
);
offset
=
skipAlias
(
stmt
,
offset
);
if
(
offset
<
0
)
{
return
OTHER
;
}
offset
=
ParseUtil
.
move
(
stmt
,
offset
,
0
);
if
(
offset
<
stmt
.
length
())
{
return
OTHER
;
}
return
LAST_INSERT_ID
;
}
public
static
int
parse
(
String
stmt
,
int
offset
)
{
int
i
=
offset
;
for
(;
i
<
stmt
.
length
();
++
i
)
{
switch
(
stmt
.
charAt
(
i
))
{
case
' '
:
continue
;
case
'/'
:
case
'#'
:
i
=
ParseUtil
.
comment
(
stmt
,
i
);
continue
;
case
'@'
:
return
select2Check
(
stmt
,
i
);
case
'D'
:
case
'd'
:
return
databaseCheck
(
stmt
,
i
);
case
'L'
:
case
'l'
:
return
lastInsertCheck
(
stmt
,
i
);
case
'U'
:
case
'u'
:
return
userCheck
(
stmt
,
i
);
case
'V'
:
case
'v'
:
return
versionCheck
(
stmt
,
i
);
default
:
return
OTHER
;
}
}
return
OTHER
;
}
static
int
select2Check
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
++
offset
&&
stmt
.
charAt
(
offset
)
==
'@'
)
{
if
(
stmt
.
length
()
>
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
case
'V'
:
case
'v'
:
return
versionCommentCheck
(
stmt
,
offset
);
case
'i'
:
case
'I'
:
return
identityCheck
(
stmt
,
offset
);
case
'S'
:
case
's'
:
return
sessionCheck
(
stmt
,
offset
);
default
:
return
OTHER
;
}
}
}
return
OTHER
;
}
/**
* SELECT @@SESSION.[AUTO_INCREMENT_INCREMENT]
*
* @param stmt
* @param offset
* @return
*/
static
int
sessionCheck
(
String
stmt
,
int
offset
)
{
int
length
=
offset
+
_SESSION
.
length
;
if
(
stmt
.
length
()
>
length
&&
ParseUtil
.
compare
(
stmt
,
offset
,
_SESSION
))
{
if
(
stmt
.
length
()
>
length
&&
stmt
.
charAt
(
length
)
!=
'.'
)
{
return
OTHER
;
}
else
{
return
SESSION
;
}
}
return
OTHER
;
}
/**
* <code>SELECT LAST_INSERT_ID() AS id, </code>
*
* @param offset
* index of 'i', offset == stmt.length() is possible
* @return index of ','. return stmt.length() is possible. -1 if not alias
*/
private
static
int
skipAlias
(
String
stmt
,
int
offset
)
{
offset
=
ParseUtil
.
move
(
stmt
,
offset
,
0
);
if
(
offset
>=
stmt
.
length
())
return
offset
;
switch
(
stmt
.
charAt
(
offset
))
{
case
'\''
:
return
skipString
(
stmt
,
offset
);
case
'"'
:
return
skipString2
(
stmt
,
offset
);
case
'`'
:
return
skipIdentifierEscape
(
stmt
,
offset
);
default
:
if
(
CharTypes
.
isIdentifierChar
(
stmt
.
charAt
(
offset
)))
{
for
(;
offset
<
stmt
.
length
()
&&
CharTypes
.
isIdentifierChar
(
stmt
.
charAt
(
offset
));
++
offset
)
;
return
offset
;
}
}
return
-
1
;
}
/**
* <code>SELECT LAST_INSERT_ID() AS id</code>
*
* @param offset
* index of first ' ' after LAST_INSERT_ID(), offset ==
* stmt.length() is possible
* @return index of 'i'. return stmt.length() is possible
*/
public
static
int
skipAs
(
String
stmt
,
int
offset
)
{
offset
=
ParseUtil
.
move
(
stmt
,
offset
,
0
);
if
(
stmt
.
length
()
>
offset
+
"AS"
.
length
()
&&
(
stmt
.
charAt
(
offset
)
==
'A'
||
stmt
.
charAt
(
offset
)
==
'a'
)
&&
(
stmt
.
charAt
(
offset
+
1
)
==
'S'
||
stmt
.
charAt
(
offset
+
1
)
==
's'
)
&&
(
stmt
.
charAt
(
offset
+
2
)
==
' '
||
stmt
.
charAt
(
offset
+
2
)
==
'\r'
||
stmt
.
charAt
(
offset
+
2
)
==
'\n'
||
stmt
.
charAt
(
offset
+
2
)
==
'\t'
||
stmt
.
charAt
(
offset
+
2
)
==
'/'
||
stmt
.
charAt
(
offset
+
2
)
==
'#'
))
{
offset
=
ParseUtil
.
move
(
stmt
,
offset
+
2
,
0
);
}
return
offset
;
}
/**
* <code>`abc`d</code>
*
* @param offset
* index of first <code>`</code>
* @return index of 'd'. return stmt.length() is possible. -1 if string
* invalid
*/
private
static
int
skipIdentifierEscape
(
String
stmt
,
int
offset
)
{
for
(++
offset
;
offset
<
stmt
.
length
();
++
offset
)
{
if
(
stmt
.
charAt
(
offset
)
==
'`'
)
{
if
(++
offset
>=
stmt
.
length
()
||
stmt
.
charAt
(
offset
)
!=
'`'
)
{
return
offset
;
}
}
}
return
-
1
;
}
/**
* <code>'abc'd</code>
*
* @param offset
* index of first <code>'</code>
* @return index of 'd'. return stmt.length() is possible. -1 if string
* invalid
*/
private
static
int
skipString
(
String
stmt
,
int
offset
)
{
int
state
=
0
;
for
(++
offset
;
offset
<
stmt
.
length
();
++
offset
)
{
char
c
=
stmt
.
charAt
(
offset
);
switch
(
state
)
{
case
0
:
switch
(
c
)
{
case
'\\'
:
state
=
1
;
break
;
case
'\''
:
state
=
2
;
break
;
}
break
;
case
1
:
state
=
0
;
break
;
case
2
:
switch
(
c
)
{
case
'\''
:
state
=
0
;
break
;
default
:
return
offset
;
}
break
;
}
}
if
(
offset
==
stmt
.
length
()
&&
state
==
2
)
{
return
stmt
.
length
();
}
return
-
1
;
}
/**
* <code>"abc"d</code>
*
* @param offset
* index of first <code>"</code>
* @return index of 'd'. return stmt.length() is possible. -1 if string
* invalid
*/
private
static
int
skipString2
(
String
stmt
,
int
offset
)
{
int
state
=
0
;
for
(++
offset
;
offset
<
stmt
.
length
();
++
offset
)
{
char
c
=
stmt
.
charAt
(
offset
);
switch
(
state
)
{
case
0
:
switch
(
c
)
{
case
'\\'
:
state
=
1
;
break
;
case
'"'
:
state
=
2
;
break
;
}
break
;
case
1
:
state
=
0
;
break
;
case
2
:
switch
(
c
)
{
case
'"'
:
state
=
0
;
break
;
default
:
return
offset
;
}
break
;
}
}
if
(
offset
==
stmt
.
length
()
&&
state
==
2
)
{
return
stmt
.
length
();
}
return
-
1
;
}
/**
* SELECT USER()
*/
static
int
userCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
5
)
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
char
c4
=
stmt
.
charAt
(++
offset
);
char
c5
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'S'
||
c1
==
's'
)
&&
(
c2
==
'E'
||
c2
==
'e'
)
&&
(
c3
==
'R'
||
c3
==
'r'
)
&&
(
c4
==
'('
)
&&
(
c5
==
')'
)
&&
(
stmt
.
length
()
==
++
offset
||
ParseUtil
.
isEOF
(
stmt
.
charAt
(
offset
))))
{
return
USER
;
}
}
return
OTHER
;
}
// SELECT VERSION
private
static
int
versionCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"ERSION"
.
length
())
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
char
c4
=
stmt
.
charAt
(++
offset
);
char
c5
=
stmt
.
charAt
(++
offset
);
char
c6
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'E'
||
c1
==
'e'
)
&&
(
c2
==
'R'
||
c2
==
'r'
)
&&
(
c3
==
'S'
||
c3
==
's'
)
&&
(
c4
==
'I'
||
c4
==
'i'
)
&&
(
c5
==
'O'
||
c5
==
'o'
)
&&
(
c6
==
'N'
||
c6
==
'n'
))
{
while
(
stmt
.
length
()
>
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
case
' '
:
case
'\t'
:
case
'\r'
:
case
'\n'
:
continue
;
case
'('
:
return
versionParenthesisCheck
(
stmt
,
offset
);
default
:
return
OTHER
;
}
}
}
}
return
OTHER
;
}
/**
* SELECT @@VERSION_COMMENT
*/
static
int
versionCommentCheck
(
String
stmt
,
int
offset
)
{
int
length
=
offset
+
_VERSION_COMMENT
.
length
;
if
(
stmt
.
length
()
>=
length
&&
ParseUtil
.
compare
(
stmt
,
offset
,
_VERSION_COMMENT
))
{
if
(
stmt
.
length
()
>
length
&&
stmt
.
charAt
(
length
)
!=
' '
)
{
return
OTHER
;
}
else
{
return
VERSION_COMMENT
;
}
}
return
OTHER
;
}
// SELECT VERSION (
private
static
int
versionParenthesisCheck
(
String
stmt
,
int
offset
)
{
while
(
stmt
.
length
()
>
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
case
' '
:
case
'\t'
:
case
'\r'
:
case
'\n'
:
continue
;
case
')'
:
while
(
stmt
.
length
()
>
++
offset
)
{
switch
(
stmt
.
charAt
(
offset
))
{
case
' '
:
case
'\t'
:
case
'\r'
:
case
'\n'
:
continue
;
default
:
return
OTHER
;
}
}
return
VERSION
;
default
:
return
OTHER
;
}
}
return
OTHER
;
}
}
bee-engine/src/main/java/com/dianping/bee/server/SimpleServerParseShow.java
→
bee-engine/src/main/java/com/dianping/bee/server/
parse/
SimpleServerParseShow.java
浏览文件 @
20b4be0c
...
...
@@ -12,7 +12,7 @@
* accordance with the terms of the license agreement you entered into
* with dianping.com.
*/
package
com.dianping.bee.server
;
package
com.dianping.bee.server
.parse
;
import
com.alibaba.cobar.parser.util.ParseUtil
;
...
...
@@ -32,6 +32,8 @@ public class SimpleServerParseShow {
public
static
final
int
TABLESTATUS
=
5
;
public
static
final
int
COLLATION
=
6
;
public
static
int
parse
(
String
stmt
,
int
offset
)
{
int
i
=
offset
;
for
(;
i
<
stmt
.
length
();
i
++)
{
...
...
@@ -54,6 +56,9 @@ public class SimpleServerParseShow {
case
'V'
:
case
'v'
:
return
showVariablesCheck
(
stmt
,
i
);
case
'C'
:
case
'c'
:
return
showCollation
(
stmt
,
i
);
default
:
return
OTHER
;
}
...
...
@@ -61,9 +66,9 @@ public class SimpleServerParseShow {
return
OTHER
;
}
// SHOW
VARIABLES
private
static
int
showVariablesCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
ariables
"
.
length
())
{
// SHOW
COLLATION
static
int
showCollation
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
ollation
"
.
length
())
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
...
...
@@ -72,49 +77,49 @@ public class SimpleServerParseShow {
char
c6
=
stmt
.
charAt
(++
offset
);
char
c7
=
stmt
.
charAt
(++
offset
);
char
c8
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'
A'
||
c1
==
'a'
)
&&
(
c2
==
'R'
||
c2
==
'r'
)
&&
(
c3
==
'I'
||
c3
==
'i
'
)
&&
(
c4
==
'A'
||
c4
==
'a'
)
&&
(
c5
==
'
B'
||
c5
==
'b'
)
&&
(
c6
==
'L'
||
c6
==
'l
'
)
&&
(
c7
==
'
E'
||
c7
==
'e'
)
&&
(
c8
==
'S'
||
c8
==
's
'
)
if
((
c1
==
'
O'
||
c1
==
'o'
)
&&
(
c2
==
'L'
||
c2
==
'l'
)
&&
(
c3
==
'L'
||
c3
==
'l
'
)
&&
(
c4
==
'A'
||
c4
==
'a'
)
&&
(
c5
==
'
T'
||
c5
==
't'
)
&&
(
c6
==
'I'
||
c6
==
'i
'
)
&&
(
c7
==
'
O'
||
c7
==
'o'
)
&&
(
c8
==
'N'
||
c8
==
'n
'
)
&&
(
stmt
.
length
()
==
++
offset
||
ParseUtil
.
isEOF
(
stmt
.
charAt
(
offset
))))
{
return
VARIABLES
;
return
COLLATION
;
}
}
return
OTHER
;
}
// SHOW
STATU
S
static
int
show
Statu
sCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
tatu
s"
.
length
())
{
// SHOW
DATABASE
S
static
int
show
Database
sCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
atabase
s"
.
length
())
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
char
c4
=
stmt
.
charAt
(++
offset
);
char
c5
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'T'
||
c1
==
't'
)
&&
(
c2
==
'A'
||
c2
==
'a'
)
&&
(
c3
==
'T'
||
c3
==
't'
)
&&
(
c4
==
'U'
||
c4
==
'u'
)
&&
(
c5
==
'S'
||
c5
==
's'
)
char
c6
=
stmt
.
charAt
(++
offset
);
char
c7
=
stmt
.
charAt
(++
offset
);
char
c8
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'A'
||
c1
==
'a'
)
&&
(
c2
==
'T'
||
c2
==
't'
)
&&
(
c3
==
'A'
||
c3
==
'a'
)
&&
(
c4
==
'B'
||
c4
==
'b'
)
&&
(
c5
==
'A'
||
c5
==
'a'
)
&&
(
c6
==
'S'
||
c6
==
's'
)
&&
(
c7
==
'E'
||
c7
==
'e'
)
&&
(
c8
==
'S'
||
c8
==
's'
)
&&
(
stmt
.
length
()
==
++
offset
||
ParseUtil
.
isEOF
(
stmt
.
charAt
(
offset
))))
{
return
STATU
S
;
return
DATABASE
S
;
}
}
return
OTHER
;
}
// SHOW
DATABASE
S
static
int
show
Database
sCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
atabase
s"
.
length
())
{
// SHOW
STATU
S
static
int
show
Statu
sCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"
tatu
s"
.
length
())
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
char
c4
=
stmt
.
charAt
(++
offset
);
char
c5
=
stmt
.
charAt
(++
offset
);
char
c6
=
stmt
.
charAt
(++
offset
);
char
c7
=
stmt
.
charAt
(++
offset
);
char
c8
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'A'
||
c1
==
'a'
)
&&
(
c2
==
'T'
||
c2
==
't'
)
&&
(
c3
==
'A'
||
c3
==
'a'
)
&&
(
c4
==
'B'
||
c4
==
'b'
)
&&
(
c5
==
'A'
||
c5
==
'a'
)
&&
(
c6
==
'S'
||
c6
==
's'
)
&&
(
c7
==
'E'
||
c7
==
'e'
)
&&
(
c8
==
'S'
||
c8
==
's'
)
if
((
c1
==
'T'
||
c1
==
't'
)
&&
(
c2
==
'A'
||
c2
==
'a'
)
&&
(
c3
==
'T'
||
c3
==
't'
)
&&
(
c4
==
'U'
||
c4
==
'u'
)
&&
(
c5
==
'S'
||
c5
==
's'
)
&&
(
stmt
.
length
()
==
++
offset
||
ParseUtil
.
isEOF
(
stmt
.
charAt
(
offset
))))
{
return
DATABASE
S
;
return
STATU
S
;
}
}
return
OTHER
;
...
...
@@ -167,4 +172,25 @@ public class SimpleServerParseShow {
}
return
OTHER
;
}
// SHOW VARIABLES
static
int
showVariablesCheck
(
String
stmt
,
int
offset
)
{
if
(
stmt
.
length
()
>
offset
+
"ariables"
.
length
())
{
char
c1
=
stmt
.
charAt
(++
offset
);
char
c2
=
stmt
.
charAt
(++
offset
);
char
c3
=
stmt
.
charAt
(++
offset
);
char
c4
=
stmt
.
charAt
(++
offset
);
char
c5
=
stmt
.
charAt
(++
offset
);
char
c6
=
stmt
.
charAt
(++
offset
);
char
c7
=
stmt
.
charAt
(++
offset
);
char
c8
=
stmt
.
charAt
(++
offset
);
if
((
c1
==
'A'
||
c1
==
'a'
)
&&
(
c2
==
'R'
||
c2
==
'r'
)
&&
(
c3
==
'I'
||
c3
==
'i'
)
&&
(
c4
==
'A'
||
c4
==
'a'
)
&&
(
c5
==
'B'
||
c5
==
'b'
)
&&
(
c6
==
'L'
||
c6
==
'l'
)
&&
(
c7
==
'E'
||
c7
==
'e'
)
&&
(
c8
==
'S'
||
c8
==
's'
)
&&
(
stmt
.
length
()
==
++
offset
||
ParseUtil
.
isEOF
(
stmt
.
charAt
(
offset
))))
{
return
VARIABLES
;
}
}
return
OTHER
;
}
}
bee-engine/src/main/resources/META-INF/plexus/components.xml
浏览文件 @
20b4be0c
...
...
@@ -89,8 +89,8 @@
</requirements>
</component>
<component>
<role>
com.dianping.bee.server.SimpleShowHandler
</role>
<implementation>
com.dianping.bee.server.SimpleShowHandler
</implementation>
<role>
com.dianping.bee.server.
handler.
SimpleShowHandler
</role>
<implementation>
com.dianping.bee.server.
handler.
SimpleShowHandler
</implementation>
<requirements>
<requirement>
<role>
com.dianping.bee.engine.spi.TableProviderManager
</role>
...
...
@@ -98,12 +98,12 @@
</requirements>
</component>
<component>
<role>
com.dianping.bee.server.SimpleUseHandler
</role>
<implementation>
com.dianping.bee.server.SimpleUseHandler
</implementation>
<role>
com.dianping.bee.server.
handler.
SimpleUseHandler
</role>
<implementation>
com.dianping.bee.server.
handler.
SimpleUseHandler
</implementation>
</component>
<component>
<role>
com.dianping.bee.server.SimpleDescHandler
</role>
<implementation>
com.dianping.bee.server.SimpleDescHandler
</implementation>
<role>
com.dianping.bee.server.
handler.
SimpleDescHandler
</role>
<implementation>
com.dianping.bee.server.
handler.
SimpleDescHandler
</implementation>
<requirements>
<requirement>
<role>
com.dianping.bee.engine.spi.TableProviderManager
</role>
...
...
@@ -111,8 +111,8 @@
</requirements>
</component>
<component>
<role>
com.dianping.bee.server.SimpleSelectHandler
</role>
<implementation>
com.dianping.bee.server.SimpleSelectHandler
</implementation>
<role>
com.dianping.bee.server.
handler.
SimpleSelectHandler
</role>
<implementation>
com.dianping.bee.server.
handler.
SimpleSelectHandler
</implementation>
<requirements>
<requirement>
<role>
com.dianping.bee.engine.spi.StatementManager
</role>
...
...
@@ -120,21 +120,21 @@
</requirements>
</component>
<component>
<role>
com.dianping.bee.server.SimpleServerQueryHandler
</role>
<implementation>
com.dianping.bee.server.SimpleServerQueryHandler
</implementation>
<role>
com.dianping.bee.server.
handler.
SimpleServerQueryHandler
</role>
<implementation>
com.dianping.bee.server.
handler.
SimpleServerQueryHandler
</implementation>
<instantiation-strategy>
per-lookup
</instantiation-strategy>
<requirements>
<requirement>
<role>
com.dianping.bee.server.SimpleSelectHandler
</role>
<role>
com.dianping.bee.server.
handler.
SimpleSelectHandler
</role>
</requirement>
<requirement>
<role>
com.dianping.bee.server.SimpleShowHandler
</role>
<role>
com.dianping.bee.server.
handler.
SimpleShowHandler
</role>
</requirement>
<requirement>
<role>
com.dianping.bee.server.SimpleDescHandler
</role>
<role>
com.dianping.bee.server.
handler.
SimpleDescHandler
</role>
</requirement>
<requirement>
<role>
com.dianping.bee.server.SimpleUseHandler
</role>
<role>
com.dianping.bee.server.
handler.
SimpleUseHandler
</role>
</requirement>
</requirements>
</component>
...
...
bee-engine/src/test/java/com/dianping/bee/engine/spi/ServerTest.java
浏览文件 @
20b4be0c
...
...
@@ -39,4 +39,5 @@ public class ServerTest extends ComponentTestCase {
System
.
out
.
println
(
"Press any key to continue ..."
);
System
.
in
.
read
();
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录