赞
踩
"C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\java_frame\spring\Spring_1\itchb_spring_jdbcTemplate -DarchetypeCatelog=internal -Dfile.encoding=GB2321 -Dmaven.home=E:\Maven\apache-maven-3.5.2 -Dclassworlds.conf=E:\Maven\apache-maven-3.5.2\bin\m2.conf "-Dmaven.ext.class.path=E:\IDEA2020\IntelliJ IDEA 2020.1.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:E:\IDEA2020\IntelliJ IDEA 2020.1.1\lib\idea_rt.jar=60654:E:\IDEA2020\IntelliJ IDEA 2020.1.1\bin" -classpath E:\Maven\apache-maven-3.5.2\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version2020.1.1 -s E:\Maven\apache-maven-3.5.2\conf\settings.xml -Dmaven.repo.local=E:\Maven\maven_repository -Dexec.workingdir=D:\java_frame\spring\Spring_1 "-Dexec.args=-classpath %classpath com.itchb.web.main" "-Dexec.executable=C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" exec:exec [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building itchb_spring_jdbcTemplate 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- exec-maven-plugin:3.0.0:exec (default-cli) @ itchb_spring_jdbcTemplate --- 十月 15, 2020 12:07:32 上午 org.springframework.context.support.AbstractApplicationContext prepareRefresh 信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@45ff54e6: startup date [Thu Oct 15 00:07:32 CST 2020]; root of context hierarchy 十月 15, 2020 12:07:32 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions 信息: Loading XML bean definitions from class path resource [applicationContext.xml] 十月 15, 2020 12:07:32 上午 org.springframework.context.support.AbstractApplicationContext refresh 警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0': Cannot create inner bean '(inner bean)#3d921e20' of type [org.springframework.aop.aspectj.AspectJExpressionPointcut] while setting bean property 'pointcut'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#3d921e20': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.676 s [INFO] Finished at: 2020-10-15T00:07:32+08:00 [INFO] Final Memory: 11M/155M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0:exec (default-cli) on project itchb_spring_jdbcTemplate: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
主要原因就是再spring实现事务管理的时候,少导了包,再pom.xml中加入以下代码即可:
<dependency>
<groupId>org.aspectj</groupId >
<artifactId>aspectjweaver</artifactId >
<version>1.8.13</version >
</dependency>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。