Skip to content

Commit b1243a3

Browse files
committed
支持 solon 启动插件模块结构扩展包
1 parent ea714cf commit b1243a3

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2011-2024, baomidou (jobob@qq.com).
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.baomidou.mybatisplus.extension.compatible;
17+
18+
/**
19+
* 兼容处理辅助类
20+
*/
21+
public class CompatibleHelper {
22+
23+
private static CompatibleSet COMPATIBLE_SET;
24+
25+
public static CompatibleSet getCompatibleSet() {
26+
return COMPATIBLE_SET;
27+
}
28+
29+
public static void setCompatibleSet(CompatibleSet compatibleSet) {
30+
if (null == COMPATIBLE_SET) {
31+
COMPATIBLE_SET = compatibleSet;
32+
}
33+
}
34+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2011-2024, baomidou (jobob@qq.com).
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.baomidou.mybatisplus.extension.compatible;
17+
18+
import org.apache.ibatis.logging.Log;
19+
import org.apache.ibatis.session.SqlSession;
20+
import org.apache.ibatis.session.SqlSessionFactory;
21+
22+
import java.io.InputStream;
23+
import java.util.function.Consumer;
24+
25+
/**
26+
* Web 开发平台待兼容方法集接口类
27+
*/
28+
public interface CompatibleSet {
29+
30+
SqlSession getSqlSession(SqlSessionFactory sessionFactory);
31+
32+
void closeSqlSession(SqlSession session, SqlSessionFactory sessionFactory);
33+
34+
boolean executeBatch(SqlSessionFactory sqlSessionFactory, Log log, Consumer<SqlSession> consumer);
35+
36+
InputStream getInputStream(String path) throws Exception;
37+
38+
}

0 commit comments

Comments
 (0)