-
Notifications
You must be signed in to change notification settings - Fork 46
在 Spring 框架中使用
見える edited this page May 4, 2022
·
2 revisions
<bean id="mysqlDS" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName">com.mysql.jdbc.Driver</property>
<property name="url">jdbc:mysql://localhost:3306/testDB</property>
<property name="username">user</property>
<property name="password">pass</property>
</bean>
<bean id="anima" class="com.hellokaton.anima.Anima">
<constructor-arg index="0" ref="mysqlDS"/>
</bean>
@Autowired
private DataSource dataSource;
@Bean
public Anima anima(){
return new Anima(dataSource);
}
Contributing
Documentation
- Getting started
- Create Model
- Query DB
- Save to DB
- Updates and Deletes
- Transaction
- Integration with Spring
- Advanced Usage
Other resources
中文文档