- 博客(13)
- 收藏
- 关注
原创 Request method 'GET' not supported
今天做登录和注册的时候出现了这个问题,百度之后说是 即提交的表单字段要与bean的类型完全对应,否则请求并不能完全对应识别。然后改了程序里面的句子。登录和注册页面要对应起来就可以这是登录的程序:pass+count.getSalt()原来写的是count.getUser(); @RequestMapping(value = "login", method = Reques...
2018-05-31 20:09:44
2416
原创 Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project web-ssm: There are test failures.[ERROR] 错误。解决方法:打包跳过测试有两种方法一是命令行,mvn clean package -Dmaven....
2018-04-09 23:18:23
1470
1
原创 java.lang.Long cannot be cast to java.lang.Integer
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='id', mode=IN, javaType=class java....
2018-04-09 14:14:06
2643
原创 update post put
我发现一个很奇怪的现象,我修改jsp的时候,控制器里面是:@RequestMapping(value = "/student/{id}",method = RequestMethod.PUT) public String updateStudent(@PathVariable("id") int id,String name,int qq,String major){ Stud...
2018-04-04 19:38:38
756
原创 Failed to load ApplicationContext
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.j...
2018-03-28 11:03:23
360
原创 解读mybatis+spring框架
public class User { private int id; private String userName; private String password; private String sex; public User(){}解读:public是权限修饰符,在它之下,还有protected,default,private。protected ...
2018-03-25 16:51:49
184
原创 @RunWith作用
@RunWith就是一个运行器@RunWith(JUnit4.class)就是指用JUnit4来运行@RunWith(SpringJUnit4ClassRunner.class),让测试运行于Spring测试环境@RunWith(Suite.class)的话就是一套测试集合,@ContextConfiguration Spring整合JUnit4测试时,使用注解引入多个配置文件单个文件 @Cont...
2018-03-24 09:50:10
48628
原创 将本地jar包上传到阿里云
在本地运行没问题之后,通过navicat连接阿里云的mysql数据库,建立一个新的数据库,数据表,和本地重名。表里面的数据相同。打包的时候,出现了问题,打完包大小才3.2K。放在阿里云上运行也不成功。然后找了个插件,加入IDEA的pom.xml文件里打包不成功有可能缺少一个插件把以下代码放入POM.xml文件就可以了 <plugin> <groupI...
2018-03-20 15:45:46
4305
原创 MYSQL报错1075
做hero数据表的时候,表中含有ID字段,并设为自增量,但没有设ID为主键,主键为其他字段,保存报错解决方案:首先将自增量ID设为主键后,再将其他需要设为主键的字段设为主键,保存成功...
2018-03-20 11:09:08
26396
原创 类Loopy是公共的, 应在名为 Loopy.java 的文件中声明
代码是这样的:public class Loopy { public static void main(String[] args){ int x = 1; System.out.println("Before the Loop"); while (x < 4) { System.out.println("In the loop"); Sy...
2018-03-16 11:16:10
1263
原创 @service作用
一开始我怎么都不理解@service今天忽然就理解了,比如说这么一段代码@Servicepublic class StudentServiceImpl implements StudentService { private Logger logger =Logger.getLogger(StudentServiceImpl.class); @Autowired private S...
2018-03-15 21:26:55
24246
7
原创 java.sql.SQLException: Incorrect integer value: 'idxxx0' for column 'id' at row 1
解决:原因是因为我把idxxx输入数据库,但是user表的设计id的字符类型是int,才11位。后来改成了varchar,报错解决。com.mysql.jdbc.PacketTooBigException: Packet for query is too large (11277826 > 1048576). You can change this value on the server b...
2018-03-15 15:39:41
9759
2
原创 java.lang.IllegalStateException: Failed to load ApplicationContext
Causedby: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController' defined infile[E:\project\ssm\target\classes\com\alibaba\controller\UserController.c
2018-02-05 11:33:22
510
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人