![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
web spring
wongnoubo
https://github.com/wongnoubo
展开
-
IDEA 运行报错:Command line is too long
背景 项目需要在Spring boot应用的Run/Debug Configuration中配置了较长的VM 参数,导致启动应用报Command line is too long错误。 原因 该选项控制如何将classpath传递给JVM:通过命令行或通过文件。大多数操作系统都有最大的命令行限制,当它超过时,IDEA将无法运行您的应用程序。 当命令行长于32768个字符时,IDEA建议您切换到动态类路径。长类路径被写入文件,然后由应用程序启动器读取并通过系统类加载器加载。 解决方案 方案1原创 2021-11-26 09:46:55 · 1051 阅读 · 0 评论 -
spring mvc中controller通过url传递参数到jsp页面
spring mvc学习记录 最近在做一个网站,在用户注册的模块需要使用邮箱激活用户,所以需要使用到Controller向jsp页面通过URL传递验证码“code”这个参数 实现效果 点击链接,激活用户 输入相关的注册信息后,jsp页面通过表单提交给controller会先向数据库中写入相关信息,但是账户还是未激活的状态,这个时候需要使用到邮箱验证激活码。通过url从controller...原创 2018-12-08 02:03:27 · 3853 阅读 · 0 评论 -
spring mvc中工具类、静态类调用service中的方法出现空指针的异常解决方法(java.lang.NullPointerException)
Spring mvc中工具类或者静态类调用service中间的方法会出现空指针的错误(java.lang.NullPointerException)。经过学习,我找到了解决的方法。 第一步: 使用注解申明spring的组件,可以使用@Component或者@Controller 第二步 正常引用要使用的service类,并且将自己作为静态私有变量引入,使其在spring mvc初始化前...原创 2018-12-06 18:51:49 · 3571 阅读 · 4 评论 -
Spring junit4单元测试出现异常:java.lang.IllegalStateException: Failed to load ApplicationContext
Spring junit4单元测试出现异常:java.lang.IllegalStateException: Failed to load ApplicationContext 1 出错如下 [WARN ] 2019-03-06 14:13:36,077 method:org.springframework.context.support.AbstractApplicationContext.r...原创 2019-03-06 14:31:04 · 3606 阅读 · 0 评论