MAVEN‘项目中启动test.java文件
Error occurred during initialization of VM VM初始化时出错
Could not reserve enough space for object heap 无法为对象堆保留足够的空间
Error occurred during initialization of VMCould not reserve enough space for object heap
解决方法
清理运行内存,运行内存占用过大,VM虚拟机空间不足造成
tomcat7 get请求乱码
解决方法:
在程序中,设置乱码数据的字符集格式
如下:
String name = “l乱码中文”name = new String(rnmae.getBytes("iso-8859-1"),"utf-8");
获取请求体中数据乱码(字符串乱码)
String s = “乱码中文”
s = URLDecoder.decode(s,“utf-8”);
Error creating bean with name ‘(inner bean)#3b0143d3’ balbala
问题叙述
Cannot create inner bean '(inner bean)#7e0b85f9' of type [org.springframework.aop.aspectj.AspectJExpressionPointcut] while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#7e0b85f9': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.aop.aspectj.AspectJExpressionPointcut] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
解决方法:
导入Spring所依赖的AspectJ的jar包引起的aspectjweaver idea连接mysql数据库
问题描述
Connection to maven@localhost failed. [08001] Could not create connection to database server. Attempted reconnect 3 times. Giving up.
解决方法:
解决方法在数据库后添加?serverTimezone=GMT
dao或Mapper中的方法不存在
原因分析:
1.Dao.xml或Mapper.xml文件中namespace或者方法与接口不一样
2.映射配置文件路径不对
3.Dao.xml 或者Mapper.xml的路径,导致读取不到
映射文件在java下的路径,则在pom.xml中需要配置如下:
<build><resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> </includes> <filtering>false</filtering> </resource> </resources></build>