五、Hibernate 配置文件(二) -- 主配置文件 (hibernate.cfg.xml)

一、hibernate.cfg.xml 主配置文件模板

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	<session-factory>
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">false</property>
		<!-- 2.3 自动建表  -->
		<property name="hibernate.hbm2ddl.auto">update</property>
		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
	
</hibernate-configuration>

二、hibernate.cfg.xml 主配置文件详解

2.1 src/hibernate.cfg.xml 注意事项
	
	1. 该主配置文件中主要用户配置:
				数据库连接信息、其他参数、映射信息!
	
					
	2. 该配置文件必须放在src根目录下。
		因为Configuration会默认加载该路径下的配置。

	
	3. 配置hibernate.cfg.xml可以借助hibernate.properties配置文件。
	 	hibernate.properties:
	 						该配置文件存储着许多key-value值。
	 						主要是hibernate.cfg.xml的常用配置。
	
	4.	hibernate.cfg.xml的key可以省略hibernate前缀。
		比如:
				<property name="hibernate.show_sql">true</property>
				<property name="hibernate.format_sql">false</property>
				<property name="hibernate.hbm2ddl.auto">update</property>
				
		可以简写为:
				<property name="show_sql">true</property>
				<property name="format_sql">false</property>
				<property name="hbm2ddl.auto">update</property>	
			
				
2.2 数据库连接配置
		+++ MySql 数据库配置
					#hibernate.dialect org.hibernate.dialect.MySQLDialect
					#hibernate.dialect org.hibernate.dialect.MySQLInnoDBDialect
					#hibernate.dialect org.hibernate.dialect.MySQLMyISAMDialect
					#hibernate.connection.driver_class com.mysql.jdbc.Driver
					#hibernate.connection.url jdbc:mysql:///test
					#hibernate.connection.username gavin
					#hibernate.connection.password

		+++ Oracle 数据库配置
					#hibernate.dialect org.hibernate.dialect.Oracle8iDialect
					#hibernate.dialect org.hibernate.dialect.Oracle9iDialect
					#hibernate.dialect org.hibernate.dialect.Oracle10gDialect
					#hibernate.connection.driver_class oracle.jdbc.driver.OracleDriver
					#hibernate.connection.username ora
					#hibernate.connection.password ora
					#hibernate.connection.url jdbc:oracle:thin:@localhost:1521:orcl
					#hibernate.connection.url jdbc:oracle:thin:@localhost:1522:XE


2.2.1 案例:连接mysql
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	<session-factory>
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">false</property>
		<!-- 2.3 自动建表  -->
		<property name="hibernate.hbm2ddl.auto">update</property>
		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
	
</hibernate-configuration>
2.2.2 案例:连接oracle
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	<session-factory>
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
		<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1522:XE</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.Oracle8iDialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">false</property>
		<!-- 2.3 自动建表  -->
		<property name="hibernate.hbm2ddl.auto">update</property>
		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
	
</hibernate-configuration>
2.2.3 数据库方言的选择

在这里插入图片描述

2.3 连接池配置
	hibernate对连接池C3P0的配置可以参考配置文档。
	下面是配置文档的部分代码

	###########################
	### C3P0 Connection Pool###
	###########################
	
	#hibernate.c3p0.max_size 2
	#hibernate.c3p0.min_size 2
	#hibernate.c3p0.timeout 5000
	#hibernate.c3p0.max_statements 100
	#hibernate.c3p0.idle_test_period 3000
	#hibernate.c3p0.acquire_increment 2
	#hibernate.c3p0.validate false
	
2.3.1 hibernate对连接池的支持
	
	DBCP的bug非常多,因此Hibernate3.0已经不再支持DBCP连接池,
	而推荐使用C3PO。  
	
2.3.2 案例:配置c3p0连接池
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	
	<session-factory >
		
		<!-- ****************************  1. 数据库连接配置【必须】	**************************** -->
	
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://106.13.58.30:3306/test</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
			
		<!--  数据库方法配置.hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql	-->
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
				
		<!-- ****************************  2.  其他相关配置【必须】	**************************** -->
		
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">false</property>
		<!-- 2.3 自动建表  -->
		<property name="hibernate.hbm2ddl.auto">create</property>
		
			
		<!-- 3. 加载所有映射 
		<mapping resource="org/jsoft/demo/EmpEntity.hbm.xml"/>
		-->
		
		
		
		<!-- ****************************  3. 连接池配置【可选】	**************************** -->
		<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
		<property name="hibernate.c3p0.max_size">200</property>
		<property name="hibernate.c3p0.min_size">2</property>
		<property name="hibernate.c3p0.timeout">5000</property>
		<property name="hibernate.c3p0.max_statements">100</property>
		<property name="hibernate.c3p0.idle_test_period">3000</property>
		<property name="hibernate.c3p0.acquire_increment">2</property>
		<property name="hibernate.c3p0.validate">false</property>
		
			
	</session-factory>
</hibernate-configuration>
2.3 其他配置
		
		+++ 显示生成的sql
				#hibernate.show_sql true
		
		+++ 格式化sql
				#hibernate.format_sql true
		
		+++ 根据映射文件,生成表
				#hibernate.hbm2ddl.auto 
										create-drop 每次在创建sessionFactory时候执行创建表;
												    当调用sesisonFactory的close方法的时候,删除表!
										create   	每次都重新建表; 如果表已经存在就先删除再创建
										update  	如果表不存在就创建; 表存在就不创建;
										validate    (生成环境时候) 执行验证: 当映射文件的内容与数据库表结构不一样的时候就报错!
		
		
		这三个是常用的其他配置,还有其他的配置。
		【如果需要其他的配置在源码中查找】
					
2.3.1 显示sql(不格式化)
		<property name="hibernate.show_sql">true</property>
		<property name="hibernate.format_sql">false</property>		

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	<session-factory>
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">false</property>		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
	
</hibernate-configuration>

在这里插入图片描述

2.3.2 显示sql(格式化)
		<property name="hibernate.show_sql">true</property>
		<property name="hibernate.format_sql">true</property>		

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	<session-factory>
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">true</property>		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
	
</hibernate-configuration>

在这里插入图片描述

2.3.3 自动建表
	
	+++ 自动创建表有两种方式:
					1.通过主配置文件配置
					2.通过硬编码。
					
			推荐使用硬编码方式。因为自动建表,不会生成任何脚本文件。
			对数据库的控制是极不安全的。
			所以如果有自动建表的需求,手动编码就好。
				
	+++ 自动建表的原理:
					我们有完整的实体与表的映射关系。
					所以我们可以通过这些映射关系,来实现表的创建。
					
====》配置建表
		
		<property name="hibernate.hbm2ddl.auto">create-drop</property>
					每次创建sessionfactory时创建表,关闭sessionfactory时,删除表

		<property name="hibernate.hbm2ddl.auto">create</property>
					每次都重新建表。如果表已经存在,就会先删除表,在新建。
					
		<property name="hibernate.hbm2ddl.auto">update</property>
					如果表不存在,就会新建。如果表存在,就不创建。
					
		<property name="hibernate.hbm2ddl.auto">validate</property>
					执行验证: 当映射文件的内容与数据库表结构不一样的时候就报错!
 
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	
	<session-factory name="21">
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->
		 
		 
		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
	
		<!-- 2.3   -->
		<property name="hibernate.hbm2ddl.auto">create</property>
		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="UserEntity.hbm.xml"/>
		
	</session-factory>
</hibernate-configuration>
====》硬编码建表
public class App_ddl {

	// 自动建表
	@Test
	public void testCreate() throws Exception {
		// 创建配置管理类对象
		Configuration config = new Configuration();
		// 加载主配置文件
		config.configure();
		
		// 创建工具类对象
		SchemaExport export = new SchemaExport(config);
		// 建表
		// 第一个参数: 是否在控制台打印建表语句
		// 第二个参数: 是否执行脚本
		export.create(true, true);
	}
}

2.3.4 在 Hibernate 中设置隔离级别
	JDBC 数据库连接使用数据库系统默认的隔离级别。在 Hibernate 的配置文件中可以显式的设置隔离级别. 每一个隔离级别都对应一个整数:
		
		1. READ UNCOMMITED
		2. READ COMMITED
		4. REPEATABLE READ
		8. SERIALIZEABLE
	Hibernate 通过为 Hibernate 映射文件指定 hibernate.connection.isolation 属性来设置事务的隔离级别。
	
		<!-- 设置 Hibernate 的事务隔离级别 2表示读已提交 -->
		<property name="connection.isolation">2</property>
2.4 映射配置
		
		<mapping resource="org/jsoft/demo/UserEntity.hbm.xml"/>
		
		加载映射文件。该映射配置必须在property标签之下。
		
<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	
	<session-factory name="21">
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->	 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="org/jsoft/demo/UserEntity.hbm.xml"/>
		
	</session-factory>
</hibernate-configuration>

三、加载映射文件

1.1.1 硬编码方式加载

		在hibernate.cfg.xml中可以不用指定映射文件,
		可以通过硬编码的方式加入映射文件。
		这种方式,一般是在测试时使用。

		new Configuration()
					.configure()
					.addClass(UserEntity.class)
					.buildSessionFactory();

		它会加载当前包下与类型一样的映射文件, 文件名:类名.hbm.xml。
		即UserEntity.hbm.xml
		

hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	
	<session-factory name="21">
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		
		<!-- 2. 其他相关配置 -->
		<!-- 2.1 显示hibernate在运行时候执行的sql语句 -->
		<property name="hibernate.show_sql">true</property>
		<!-- 2.2 格式化sql -->
		<property name="hibernate.format_sql">true</property>
		<!-- 2.3 自动建表  -->
		<property name="hibernate.hbm2ddl.auto">update</property>

		
	</session-factory>
</hibernate-configuration>

Demo.java

public class Demo {
	
	public static SessionFactory sf;
	static {
		sf=new Configuration()
		   .configure()
		   //测试中使用。在hibernate.cf.xml不用配置映射文件。
		   //它会自动加载同包下的UserEntity.hbm.xml文件
		   .addClass(UserEntity.class) 
		   .buildSessionFactory();
	}
	
	public static void main(String[] args) {

	}
}

1.1.2 配置方式加载映射文件
	映射文件的名称可以随意指定。只需要在hibernate.cfg.xml中引入即可。

org/jsoft/demo/xxx.hbm.xml

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC 
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">

<hibernate-mapping package="org.jsoft.demo">
	
	<class name="UserEntity" table="USER">
		
		<!-- 主键 ,映射	-->
		<id name="id" column="u_id" >
		</id>
		
		<!-- 非主键,映射 -->
		<property name="name" column="u_name"></property>
		<property name="birth" column="u_birth"></property>
		
	</class>

</hibernate-mapping>

src/hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<!-- 通常,一个session-factory节点代表一个数据库 -->
	
	<session-factory name="21">
	
		<!-- 1. 数据库连接配置 -->
		<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jsoft</property>
		<property name="hibernate.connection.username">root</property>
		<property name="hibernate.connection.password">root</property>
		
		<!-- 
			数据库方法配置, hibernate在运行的时候,会根据不同的方言生成符合当前数据库语法的sql
		 -->		 
		<property name="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</property>
		
		<!-- 3. 加载所有映射 -->
		<mapping resource="org/jsoft/demo/xxx.hbm.xml"/>
		
	</session-factory>
</hibernate-configuration>
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Hibernate.cfg.xml文件是Hibernate框架中的配置文件之一,用于配置Hibernate的各种属性和参数。在该文件中,可以配置数据源、数据库连接池、映射文件、缓存策略等等。 其中,常用的配置属性包括: 1. hibernate.connection.driver_class:指定数据库驱动程序的类名。 2. hibernate.connection.url:指定数据库的连接URL。 3. hibernate.connection.username:指定连接数据库所需的用户名。 4. hibernate.connection.password:指定连接数据库所需的密码。 5. hibernate.dialect:指定数据库方言,用于生成针对具体数据库的SQL语句。 6. hibernate.show_sql:设置是否在控制台打印生成的SQL语句。 7. hibernate.format_sql:设置是否格式化生成的SQL语句。 此外,在Hibernate.cfg.xml文件中还可以配置其他相关属性,如连接池的最大连接数、最小连接数等。可以通过修改这些配置属性来满足具体的业务需求。 需要注意的是,Hibernate.cfg.xml文件的配置可以使用properties属性文件格式,也可以使用XML格式进行配置。可以根据具体的需求选择适合的配置方式。 总之,Hibernate.cfg.xml文件是Hibernate框架中的重要配置文件,用于配置各种属性和参数,以便进行数据库操作和映射。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Hibernate.cfg.xml文件的配置](https://blog.csdn.net/u022812849/article/details/40827561)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [hibernate.cfg.xml配置总结](https://blog.csdn.net/hiyu2218/article/details/4169585)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值