Spring4.x第二章实例 1.0 chapter2【原书源码报错】

这篇博客记录了在运行Spring4.x第二章实例时遇到的错误,包括资源复制警告、测试失败等问题。错误涉及Maven、Jetty插件、Surefire报告,以及在UserServiceTest中的断言失败。测试失败原因可能是数据库表结构与SQL语句不匹配,导致BadSqlGrammarException。博主将提供问题排查和解决方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/Volumes/我的电脑/我的电脑/Desktop/wangpan/chapter2 "-Dmaven.home=/Volumes/我的电脑/我的电脑/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Volumes/我的电脑/我的电脑/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" -Dfile.encoding=UTF-8 -classpath "/Volumes/我的电脑/我的电脑/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2017.2.5 org.mortbay.jetty:maven-jetty-plugin:6.1.25:run-exploded
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Spring4.x第二章实例 1.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> maven-jetty-plugin:6.1.25:run-exploded (default-cli) > package @ chapter2 >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ chapter2 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ chapter2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ chapter2 ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Volumes/我的电脑/我的电脑/Desktop/wangpan/chapter2/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ chapter2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ chapter2 ---
[INFO] Surefire report directory: /Volumes/我的电脑/我的电脑/Desktop/wangpan/chapter2/target/surefire-reports




-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.smart.service.UserServiceTest
Configuring TestNG with: TestNG652Configurator
Nov 23, 2017 4:20:47 PM org.springframework.test.context.support.DefaultTestContextBootstrapper getTestExecutionListeners
??: Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@544fe44c, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@31610302, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@71318ec4, org.springframework.test.context.support.DirtiesContextTestExecutionListener@21213b92, org.springframework.test.context.transaction.TransactionalTestExecutionListener@a67c67e, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@3327bd23]
Nov 23, 2017 4:20:47 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
??: Loading XML bean definitions from URL [file:/Volumes/我的电脑/我的电脑/Desktop/wangpan/chapter2/target/classes/smart-context.xml]
Nov 23, 2017 4:20:48 PM org.springframework.context.support.GenericApplicationContext prep
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值