Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Resource id="MySQLDB" type="DataSource">
- JdbcDriver com.mysql.jdbc.Driver
- JdbcUrl jdbc:mysql://localhost/test
- UserName root
- Password mysql
- </Resource>
- @Resource(name="MySQLDB")
- private DataSource ds;
- ・・・
- System.out.println("DB:" + ds.getConnection().getMetaData().getDatabaseProductName());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement