在项目中需要启动程序时,要将数据库的用户信息表加载到内存中,找到一下几种方式. 1.实现ApplicationListener接口,重写onApplicationEvent方法,可以在项目启动的时候执行该方法. @Component("userInit") public class UserInit implements ApplicationListener { public static Map<String,User> map=new HashMap<Strin
Address already in use: JVM_Bind<null>:8080在MyEclipse启动或者是tomcat启动的时候出现:Address already in use: JVM_Bind<null>:8080 出现该异常,这里的8080是你的端口,有可能是80或者其他,但是都是一个原因引起的,我在用MyEclipse的时候,有时候MyEclipse突然死掉了,然后我就直接关掉在打开,这时候重启服务器就会出现该异常:Address already in use:
选择菜单栏的window-->Preferences-->General-->Startup and Shutdown-->workspaces, Recent workspaces下面的列表里就是已经设置过的工作区间.如果要删除已不用的,选中,点remove就好了. 如果之前选择不再提示,默认使用本工作区,在启动时想重新选择, 把右面的第一个复选框“Prompt for workspace on startup选上就可以了. Number of recent workspaces