ssmbug
qq_36741208
这个作者很懒,什么都没留下…
展开
-
spring依赖注入 和new的对象的管理
问题:一个业务类交给spring管理,并自动注入了其他业务类作为属性,方法中通过全局属性调用其他业务类的方法。当该业务类是通过new获取的情况下,该实例的属性会是null(不存在依赖注入实例),调用方法就会报空指针。为保证该方法无论是被new出来的对象调用还是被spring容器对象引用都能正常使用,方法中就要 使用spring管理的类 。获取spring管理的对象: WebAppl...转载 2019-01-30 12:25:06 · 776 阅读 · 0 评论 -
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on pr
maven install web项目时报错:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project spring2: Error assembling WAR: webxml attribute is required (or pre-e...转载 2019-01-19 08:26:12 · 2756 阅读 · 1 评论 -
Error configuring application listener of class org.springframework.web.context.ContextLoader
出现的问题:Error configuring application listener of class org.springframework.web.context.ContextLoaderListenerjava.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener ...转载 2019-01-19 08:25:27 · 98 阅读 · 0 评论 -
maven项目debug断点调试
如何运行设置断点后的程序:tomcat服务器我选的是debug 方式启动右键项目 – Debug as – Java Application看哪些地方: Debug:断点测试的地方 在这个地方,记住F6这个快捷键,或者点击Step Over也可以。一次看一行的执行过程。 Variables:查看程序的变量变化 ForDemo:被查看的源文件 Con...原创 2019-11-13 15:11:25 · 2857 阅读 · 0 评论 -
mybatis与tomcat版本不兼容
SEVERE: Unable to process Jar entry [org/apache/ibatis/javassist/ByteArrayClassPath.class] from Jar [jar:file:/var/wd/travel_train_web/webapps/ROOT/WEB-INF/lib/mybatis-3.3.1.jar!/] for annotations...转载 2019-11-13 15:07:47 · 139 阅读 · 0 评论 -
mybatis+spring整合 Thread[C3P0PooledConnectionPoolManagAccess denied for user '27819'@'localhost'
使用cp30数据源,mybatis+spring配置时候,报错,Thread[C3P0PooledConnectionPoolManager[identityToken->1hge1648v7x7xsqhft1n|1e3a43]-HelperThread-#1,5,main]java.net.SocketInputStream.socketRead0(Native Method)...原创 2019-04-02 11:31:51 · 1167 阅读 · 0 评论