Mybatis 3.3.0 中文用户指南从 XML 文件中构建 SqlSessionFactory 的实例非常简单,建议使用类路径下的资源文件进行配置。但是也可以使用任意的输入流 (InputStream)实例,包括字符串形式的文件路径或者 file:// 的 URL 形式的文件路径来配置。MyBatis 包含一个名叫 Resources 的 工具类,它包含一些实用方法,可使从 classpath 或其他位置加载资源文件更加容易。 String SqlSessionFactory 如果你更愿意直接从 Java 程序而不是 XML 文件中创建 configuration,或者创建你自己的 configuration 构建器,MyBatis 也提供 了完整的配置类,提供所有和 XML 文件相同功能的配置项。 DataSource dataSource = BlogDataSourceFactory.getBlogDataSource(); TransactionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(configuration); 注意该例中,configuration 添加了一个映射器类(mapper class)。映射器类是 Java 类,它们包含 SQL 映射语句的注解从而避免 了 XML 文件的依赖。不过,由于 Java 注解的一些限制加之某些 MyBatis 映射的复杂性,XML 映射对于大多数高级映射(比如:嵌套0 码力 | 98 页 | 2.03 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0? . . . . . . . . . . . . . . 288 7.7.4 4. [Proxy] Windows 环境下,运行 ShardingSphere‐Proxy,找不到或无法加载主 类 org.apache.shardingsphere.proxy.Bootstrap,如何解决? . . . . . . . . . . . 289 7.7.5 5. [Proxy] 在使用 ShardingSphere‐Proxy 象 获 取 ShardingSphereDataSource。该对象实现自 JDBC 的标准 DataSource 接口,可用于原生 JDBC 开发,或使用 JPA, MyBatis 等 ORM 类库。 DataSource dataSource = ShardingSphereDataSourceFactory. createDataSource(dataSourceMap, configurations • 功能 # 弹性伸缩:核心概念、使用规范 • 用户手册 # 弹性伸缩:运行部署、使用手册 • RAL# 弹性伸缩:弹性伸缩的 DistSQL • 开发者手册 # 弹性伸缩:SPI 接口及实现类 2.3. ShardingSphere-Scaling (Experimental) 9 3 概念 Apache ShardingSphere 功能十分复杂,有数百模块之多,但众多模块间的概念却简单明了。大部分模块0 码力 | 385 页 | 4.26 MB | 1 年前3
Apache ShardingSphere 中文文档 5.0.0-alpha. . . . . . . . . . . . . . . 288 7.14 Windows 环 境 下, 运 行 ShardingSphere‐Proxy, 找 不 到 或 无 法 加 载 主 类 org.apache.shardingsphere.proxy.Bootstrap,如何解决? . . . . . . . . . . . . . . . . . 289 7.15 Type is 象 获 取 ShardingSphereDataSource。该对象实现自 JDBC 的标准 DataSource 接口,可用于原生 JDBC 开发,或使用 JPA, MyBatis 等 ORM 类库。 DataSource dataSource = ShardingSphereDataSourceFactory. createDataSource(dataSourceMap, configurations 用的是 Groovy 的语法, Groovy 能够支持的所有操作,行表达式均能够支持。例如: ${begin..end} 表示范围区间 ${[unit1, unit2, unit_x]} 表示枚举值 3.1. 数据分片 15 Apache ShardingSphere document, v5.0.0-beta 行表达式中如果出现连续多个 ${ expression } 或 $->{ expression0 码力 | 301 页 | 3.44 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.2. . . . . . . . . . . . . . . . . 316 7.8.4 [Proxy] Windows 环境下,运行 ShardingSphere‐Proxy,找不到或无法加载主类 org.apache.shardingsphere.proxy.Bootstrap,如何解决? . . . . . . . . . . . . 316 7.8.5 [Proxy] 在使用 ShardingSphere‐Proxy com/apache/shardingsphere/tree/master/shardingsphere‐distsql 3.4 可插拔架构 3.4.1 背景 在 Apache ShardingSphere 中,很多功能实现类的加载方式是通过 SPI(Service Provider Interface)注 入的方式完成的。SPI 是一种为了被第三方实现或扩展的 API,它可以用于实现框架扩展或组件替换。 3.4.2 挑战 用的是 Groovy 的语法, Groovy 能够支持的所有操作,行表达式均能够支持。例如: ${begin..end} 表示范围区间 ${[unit1, unit2, unit_x]} 表示枚举值 行表达式中如果出现连续多个 ${ expression } 或 $->{ expression } 表达式,整个表达式最终 的结果将会根据每个子表达式的结果进行笛卡尔组合。 例如,以下行表达式:0 码力 | 446 页 | 4.67 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.0. . . . . . . . . . . . . . . . . 301 7.8.4 [Proxy] Windows 环境下,运行 ShardingSphere‐Proxy,找不到或无法加载主类 org.apache.shardingsphere.proxy.Bootstrap,如何解决? . . . . . . . . . . . . 301 7.8.5 [Proxy] 在使用 ShardingSphere‐Proxy ShardingSphereDataSource。该对象实现自 JDBC 的标准 DataSource 接口,可用于原生 JDBC 开发,或使用 JPA, Hibernate, MyBatis 等 ORM 类库。 DataSource dataSource = ShardingSphereDataSourceFactory. createDataSource(schemaName, modeConfig • 功能 # 弹性伸缩:核心概念、使用规范 • 用户手册 # 弹性伸缩:运行部署、使用手册 • RAL# 弹性伸缩:弹性伸缩的 DistSQL • 开发者手册 # 弹性伸缩:SPI 接口及实现类 2.3. ShardingSphere-Scaling (Experimental) 9 3 概念 Apache ShardingSphere 功能十分复杂,有数百模块之多,但众多模块间的概念却简单明了。大部分模块0 码力 | 406 页 | 4.40 MB | 1 年前3
Apache ShardingSphere 中文文档 5.1.1. . . . . . . . . . . . . . . . . 305 7.8.4 [Proxy] Windows 环境下,运行 ShardingSphere‐Proxy,找不到或无法加载主类 org.apache.shardingsphere.proxy.Bootstrap,如何解决? . . . . . . . . . . . . 305 7.8.5 [Proxy] 在使用 ShardingSphere‐Proxy ShardingSphereDataSource。该对象实现自 JDBC 的标准 DataSource 接口,可用于原生 JDBC 开发,或使用 JPA, Hibernate, MyBatis 等 ORM 类库。 DataSource dataSource = ShardingSphereDataSourceFactory. createDataSource(schemaName, modeConfig • 功能 # 弹性伸缩:核心概念、使用规范 • 用户手册 # 弹性伸缩:运行部署、使用手册 • RAL# 弹性伸缩:弹性伸缩的 DistSQL • 开发者手册 # 弹性伸缩:SPI 接口及实现类 2.3. ShardingSphere-Scaling (Experimental) 9 3 概念 Apache ShardingSphere 功能十分复杂,有数百模块之多,但众多模块间的概念却简单明了。大部分模块0 码力 | 409 页 | 4.47 MB | 1 年前3
Apache ShardingSphere 中文文档 5.4.110.1.1 StandalonePersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 定义 . . . . . . . 10.1.2 ClusterPersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 定义 . . . . . . . 416 10.2.1 DatabaseTypedSQLParserFacade . . . . . . . . . . . . . . . . . . . . . . . . . . 416 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416 定义 . . . . . . .0 码力 | 530 页 | 4.49 MB | 1 年前3
Apache ShardingSphere v5.5.0 中文文档10.1.1 StandalonePersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 441 定义 . . . . . . . 10.1.2 ClusterPersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 vii 定义 . . . . . 442 10.2.1 DatabaseTypedSQLParserFacade . . . . . . . . . . . . . . . . . . . . . . . . . . 442 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442 定义 . . . . . . .0 码力 | 557 页 | 4.61 MB | 1 年前3
Apache ShardingSphere 中文文档 5.2.05.1.1 StandalonePersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 定义 . . . . . . . 5.1.2 ClusterPersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 定义 . . . . . . . 5.1.3 GovernanceWatcher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273 定义 . . . . . . .0 码力 | 449 页 | 5.85 MB | 1 年前3
Apache ShardingSphere 中文文档 5.3.210.1.1 StandalonePersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395 定义 . . . . . . . 10.1.2 ClusterPersistRepository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 定义 . . . . . . . 396 10.2.1 DatabaseTypedSQLParserFacade . . . . . . . . . . . . . . . . . . . . . . . . . . 396 全限定类名 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396 定义 . . . . . . .0 码力 | 508 页 | 4.44 MB | 1 年前3
共 19 条
- 1
- 2













