application.conf
mysql = {
url = "jdbc:mysql://localhost:3306/scala"
driver = com.mysql.jdbc.Driver
user = "root"
password = "111111"
connectionPool = disabled
keepAliveConnection = true
}
scheme定义
import slick.driver.MySQLDriver.api._
class Suppliers(tag: Tag) extends Table[(Int, String, String, String, String, String)](tag, "SUPPLIERS") {
def id = column[Int]("SUP_ID", O.PrimaryKey)
def name = column[String]("SUP_NAME")
def street = column[String]("STREET")
def city = column[String]("CITY")
def state = column[String]("STATE")
def zip = column[String]("ZIP")
def * = (id, name, street, city, state, zip)
}
class Coffees(tag: Tag) extends Table[(Int,String,Int, Double, Int, Int