摘要:1、vi/etc/ssh/sshd_config 修改配置允许公钥登录 RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys 2、重启ssh :systemctl restart
阅读全文
摘要:一、数据库连接配置 DBeaver版本7.3.3; 关键配置是Server,认证,编辑驱动MySQL的库。 1、Unknown database 'localhost' 不要写上数据库,数据库连接默认是所有的数据库。 2、Can't create driver instance Error crea
阅读全文
摘要:@RestController("/test")public class TestController { public String test1(@RequestParam String name){ return "hi,"+name; } @RequestMapping public Stri
阅读全文
摘要:BeanFactory not initialized or already closed - call 'refresh' before access web项目默认会去寻找spring-mvc.xml文件,没有配置就会报错。 改成: <context-param> <param-name>con
阅读全文
摘要:Bean property 'users' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter? 错误原因
阅读全文
摘要:解决方法: 1、yum clean all 2、yum makecache 3.再给yum来个升级【可选】。 yum -y update 重装
阅读全文
摘要:一般是映射处理这个url请求的控制器 方法返回值问题 比如没有跳转页面,没有返回对象(即void)则报错 控制器处理方法跳转到映射的请求反复也会如此 返回值类型为void, 方法体也没有跳转页面的话,则会报这个错误。 如果把返回值类型改为String(并不配置视图解析器映射), 对应的是返回404而
阅读全文
摘要:java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.CacheAwareContextLoaderDelegate.loadContext(Cac
阅读全文
摘要:1、可能是SqlSessionFactoryBean配置错误 <bean id="mySqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataS
阅读全文
摘要:@ResponseBody @RequestMapping(value = "/save") public String callSomeone() { return "保存成功"; }显示乱码设置了CharacterEncodingFilter为UTF-8,方法一:指定RequestMapping
阅读全文
摘要:Incorrect string value: '\xE9\x98\xBF\xE4\xBE\x9D...' for column 'pname' at row 1乱码问题 解决方式: 1、简单粗暴:把mysql表的乱码的那个字段编码改成utf8 2、用软件改变表的编码为utf8;或者用sql语句 3
阅读全文
摘要:UserMapper.xml配置有问题: 返回List需要另外配置resultMap public List<User> queryAll(); <mapper namespace="com.ssm.dao.UserDao"><!-- 自定义返回结果集 --> <resultMap id="user
阅读全文
摘要:可能的问题: 1、访问路径有问题 2、没有扫描到注解 解决方法: 配置文件:开启注解,扫描到@Controller和@RequestMapping <context:component-scan base-package="com" /> <!-- 扩充了注解驱动,可以将请求参数绑定到控制器参数 -
阅读全文
摘要:创建项目时自动生成的web.xml配置文件头,是2.3的,改成2.5以及以上版本需要更换格式成: <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
阅读全文
摘要:spring中应用flyway 报错: org.flywaydb.core.api.FlywayException: Validate failed: Detected failed migration to version 1.0.9 (update) 解决方法: 一、检查配置类 二、检查数据库里
阅读全文