<dependency>
<groupId>org.eweb4j</groupId>
<artifactId>eweb4j-all</artifactId>
</dependency>
<routes>
<route path="/hello" method="GET" action="com.example.Controller.sayHello" />
<route path="/login" method="POST" action="com.example.Controller.login" />
</routes>
database.driverClass=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost:3306/mydb
database.user=root
database.password=123456
@Table
public class User {
@Id(auto = true)
private int id;
@Column
private String username;
@Column
private String password;
}
public class UserController {
public void getUser(int id) {
User user = DAOFactory.getSelectDAO().select(User.class, id);
}
}