我正在使用http://www.chartjs.org/的折线图

如您所见,Y轴的最大值(130)和最小值(60)是自动选择的,我希望最大值= 500,最小值= 0.这可能吗?
在其中一个应用程序中,我看到实体管理器是"按用户HttpSession"创建的,而EntityManagerFactory只创建一次.
Spring或EJB未在应用程序中使用.实体管理器缓存在http会话中,并在会话失效时关闭.
public EntityManager getEntityManager() {
//Logic to get entity manger from session
//If its present , then return
//Else create new one , entityManagerFactory.createEntityManager();
//Put it into session and then return.
//Returned entity manager is not closed by dao methods ,
//but clear() is invoked
}
Run Code Online (Sandbox Code Playgroud)
我有3个实体.分公司,主题,话题.分支具有主题列表,主题具有主题列表.subjectList和topicList都是懒惰的.我想在单个查询中获取所有分支,包括其主题和主题.
1.
@Entity
public class Branch implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
private String name;
@OneToMany(mappedBy = "branch")
private List<Subject> subjectList;
//Getters and Setters
}
Run Code Online (Sandbox Code Playgroud)
2.
@Entity
public class Subject implements Serializable
{
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Integer id;
private String name;
@ManyToOne()
private Branch branch;
@OneToMany(mappedBy = "subject")
private List<Topic> topicList;
//Getters and Setters
}
Run Code Online (Sandbox Code Playgroud)
3.
@Entity
public class Topic …Run Code Online (Sandbox Code Playgroud) 我正在做AngularJS和Spring REST应用程序.这是我的代码.
@RestController
@RequestMapping("/user")
// @Secured("ROLE_ADMIN")
public class UserController
{
@RequestMapping(value = "/verifyUser", method = RequestMethod.POST)
public Boolean verifyUser(@RequestBody User user)
{
}
}
Run Code Online (Sandbox Code Playgroud)
如果 user对象格式不正确,则浏览器 400 (Bad Request)
显示Eclipse控制台中没有显示其他错误.我只是想知道如果user对象的格式不正确,反序列化中会出现什么确切的错误 .
我遇到的情况是最终用户输入 id 属性。假设文本框的 id 是用户输入的“11_=11”,那么 html 代码将如下所示:
<input type="text" id="11_=11">
Run Code Online (Sandbox Code Playgroud)
jQuery 选择器将是
$("#11_=11")
Run Code Online (Sandbox Code Playgroud)
但这会引发错误,因为无法识别的表达式。我可以限制用户为 id 属性输入的字符。但我不知道哪些字符给 jQuery 选择器带来了问题。请帮忙。