Bla*_*man 6 java spring jdbc jdbctemplate
我有我的rowmapper:
private static final class UserRowMapper implements RowMapper<User> {
User user = new User();
user.setId(rs.getInt("id"));
user.setUserType( (UserType)rs.getInt("userType")); // ?????
return user;
}
Run Code Online (Sandbox Code Playgroud)
所以我试图将dbType for userType中的整数值强制转换为枚举UserType.
为什么这不起作用?
| 归档时间: |
|
| 查看次数: |
8582 次 |
| 最近记录: |