SpringBoot添加JDBC和MyBatis依赖后运行报错

01-Dec-2018 17:38:37.377 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:483)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:432)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mappers' defined in URL [jar:file:/D:/java项目/demo/page/target/page/WEB-INF/lib/dao-0.0.1-SNAPSHOT.jar!/forumss/Mappers.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1362)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:575)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:827)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:157)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:137)
at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:91)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:171)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5245)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 42 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/mybatis/spring/boot/autoconfigure/MybatisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:1467)
... 62 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:607)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:273)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1237)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
... 75 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
... 89 more
Caused by: org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.determineDriverClassName(DataSourceProperties.java:236)
at org.springframework.boot.autoconfigure.jdbc.DataSourceProperties.initializeDataSourceBuilder(DataSourceProperties.java:176)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration.createDataSource(DataSourceConfiguration.java:43)
at org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari.dataSource(DataSourceConfiguration.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 90 more

01-Dec-2018 17:38:37.401 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method manageApp
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:483)
[2018-12-01 05:38:37,424] Artifact page:war exploded: Error during artifact deployment. See server log for details.
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:432)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

01-Dec-2018 17:38:37.402 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method createStandardContext
javax.management.RuntimeOperationsException: Exception invoking method manageApp
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:308)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:483)
at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:432)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1736)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)
... 33 more

1个回答

连接url是什么,检查一下

HZH183
public void main jdbc:mysql://localhost:3306/209forum 没错的
10 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
springboot创建项目后运行报错
Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the fol...
vue-cli安装依赖后运行报错
These dependencies were not found: * !!vue-style-loader!css-loader?{"sourceMap":true}!../../../node_modules/vue-loader/lib/style-compiler/index?{"vue":true,"id":"data-v-de3f5272","scoped":false,"hasI.
SpringBoot 添加插件依赖
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.
Springboot集成通用Mapper和自动生成后运行报错
报错信息如下 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvide...
springboot打成war包后在tomcat运行报错。
Caused by: javax.websocket.DeploymentException: Multiple Endpoints may not be deployed to the same path [/websocket] : existing endpoint was class [color=#FF0000]com.test.framework.websocket.WebsocketBase[/color] and new endpoint is class [color=#FF0000]com.test.framework.websocket.WebsocketBase[/color]rn at org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:180) ~[tomcat-embed-websocket-8.5.14.jar:8.5.14]rn at org.apache.tomcat.websocket.server.WsServerContainer.addEndpoint(WsServerContainer.java:234) ~[tomcat-embed-websocket-8.5.14.jar:8.5.14]rn at org.springframework.web.socket.server.standard.ServerEndpointExporter.registerEndpoint(ServerEndpointExporter.java:145) ~[spring-websocket-4.3.8.RELEASE.jar:4.3.8.RELEASE]rn ... 25 common frames omittedrn rnrn在springboot上运行正常,但是生成war包后在tomcat下运行失败
springboot启动时mybatis报循环依赖的错误
自己在做项目时,想使用热部署减少部署时间,于是添加了springboot-devtools在maven中添加了依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-...
SpringBoot项目运行报错
使用IDEA创建SpringBoot,项目启动报错:java.lang.NoSuchMethodError:org.springframework.boot.builder.SpringApplicationBuilder.<init([Ljava/lang/Object;)V兼容性错误,引用了2.0.0.RELEASE修改pom文件如下:<parent> <grou...
springboot2集成mybatis运行报错
springboot2运行抛错1.配置文件的datasource数据源写错了,或者是粘贴过来就没改,或者是就是看不懂,看不懂那就没招了spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode\=true&amp...
springboot在pom.xml中添加本地的maven依赖
一些比较大型的项目中,普通的包都可以添加maven依赖从网上下载,但是也可能会出现一些比较特殊的包或一些本地比较全,网上比较沉杂的包需要引用,比如:1.在大型项目中可能需要另起一个项目来些工具类,并将这个项目打成jar包供其它项目引用;2.在开发大数据的时候个人习惯使用本地jar包,这个也需要本地引用。 pom.xml引用本地jar包的方法如下: 在项目目录下新建jar的存放文件夹(我是直接在...
在Maven仓库中添加Oracle数据库的JDBC驱动依赖
今天在使用IDEA构建Maven项目时,发现Oracle数据库JDBC驱动依赖使用不了,就在网上搜索了一下,下面是不能使用的原因。 由于Oracle授权问题,Maven3不提供oracle JDBC driver,我们也可以在Maven的中心搜索ojdbc驱动包,但是可以看到版本过于陈旧,即使有坐标,也下载不了。 为了可以在使用Maven构建的项目中使用Oracle JDBC driv
maven添加oracle jdbc驱动的依赖问题
在maven工程里不能下载oracle的jdbc驱动jar包,需要Oracle官方授权才可以,找一个ojdbc14的10.2.0.1.0或10.2.0.1.0包[见附件,有两个版本],通过下面的命令,让maven重新打成jar包并放到本地库中去: mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversi...
三、SpringBoot配置JDBC(集成Mybatis)
1.添加jdbc启动器 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency&g...
Pycharm添加包后运行报错module not found
网上搜了搜右击引入的包 Make Directory as -> Sources Root后正常,貌似Pycharm不会将目录自动加入source path
求助!添加ajax Toolkit.dll后运行报错!!
我添加了ajax Toolkit.dll后,然后托了一个控件上来,运行时报了这样的错误,请问怎么回事????rnrnrn未能找到任何适合于指定的区域性或非特定区域性的资源。请确保在编译时已将“AjaxControlToolkit.Properties.Resources.resources”正确嵌入或链接到程序集“AjaxControlToolkit”,或者确保所有需要的附属程序集都可加载并已进行了完全签名。 rn
springboot整合mybatis和jdbc是,jdbc无法使用
我在整合mybatis和jdbc时遇到的问题,是这两个放一起后jdbc无法使用 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.xpf.dao.UserInfoDao.findUser at org.apache.ibatis.binding.MapperMethod$S...
SpringBoot以jar包形式运行报错~~~~
PS D:\IDE\Maven\repository\com\Spring-Boot\0.0.1-SNAPSHOT> java -jar .\Spring-Boot-0.0.1-SNAPSHOT.jarrnException in thread "main" java.lang.IllegalStateException: Failed to get nested archive for entry BOOT-INF/lib/snakeyaml-1.19.jarrn at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:109)rn at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchives(JarFileArchive.java:87)rn at org.springframework.boot.loader.ExecutableArchiveLauncher.getClassPathArchives(ExecutableArchiveLauncher.java:72)rn at org.springframework.boot.loader.Launcher.launch(Launcher.java:49)rn at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)rnCaused by: java.io.IOException: Unable to open nested jar file 'BOOT-INF/lib/snakeyaml-1.19.jar'rn at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:252)rn at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:237)rn at org.springframework.boot.loader.archive.JarFileArchive.getNestedArchive(JarFileArchive.java:104)rn ... 4 morernCaused by: java.lang.IndexOutOfBoundsExceptionrn at org.springframework.boot.loader.jar.AsciiBytes.(AsciiBytes.java:69)rn at org.springframework.boot.loader.jar.CentralDirectoryFileHeader.load(CentralDirectoryFileHeader.java:95)rn at org.springframework.boot.loader.jar.CentralDirectoryParser.parseEntries(CentralDirectoryParser.java:68)rn at org.springframework.boot.loader.jar.CentralDirectoryParser.parse(CentralDirectoryParser.java:57)rn at org.springframework.boot.loader.jar.JarFile.(JarFile.java:118)rn at org.springframework.boot.loader.jar.JarFile.(JarFile.java:106)rn at org.springframework.boot.loader.jar.JarFile.createJarFileFromFileEntry(JarFile.java:290)rn at org.springframework.boot.loader.jar.JarFile.createJarFileFromEntry(JarFile.java:260)rn at org.springframework.boot.loader.jar.JarFile.getNestedJarFile(JarFile.java:248)rn ... 6 morernrnrnrn在eclipse中运行没有问题,单独运行就报错了
SpringBoot导入thymeleaf模板,运行报错。
报错: SpringBoot导入thymeleaf模板,运行报错org.xml.sax.SAXParseException: 元素类型 “link” 必须由匹配的结束标记 终止。 1、新建SpringBoot MAVEN项目后 JAR类型的项目 2、新增pom.xml文件 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:x...
mybatis添加后返回主键
useGeneratedKeys="true" keyProperty="mediaId"【实体中的属性】 keyColumn="media_id"【数据库中的字段】 <insert id="insertSelective" useGeneratedKeys="true" keyProperty="mediaId" keyColumn="media_id" parameterTy...
添加依赖
//添加依赖 compile'com.android.support:design:26+' TableLayout   //需要重写个返回标题的方法;         @Override         public CharSequence getPageTitle(int position) {             return titleList.get(position);
SpringBoot系列——MyBatis添加通用Mapper
一、引入依赖     这里只引入通用Mapper的依赖,mybatis等的依赖引入可参见我的其他博客: <!--通用mapper--> <dependency> <groupId>tk.mybatis</groupId> <artifactId>map...
springBoot添加数据库源并集成mybatis
数据库建立连接application配置文件中添加: spring: datasource: url: 数据库url username: 用户名 password: 密码 driver-class-name: com.mysql.jdbc.Driver pom文件添加jar包: <dependency> <groupId&g...
springboot集成mybatis添加注解事务
public class Country { //实体类参考本人博客地址:https://blog.csdn.net/yl_hahha/article/details/80208161 private long id; private String countryname; private String countrycode; public long ge...
springboot + mybatis
springboot + mybatis示例项目,非常完美的示例!
springboot mybatis
本例是springboot和mybatis整合进行crud操作的微型demo。简单明了,新手也可以很快掌握。注意,你需要使用tomcat8才能运行。
SpringBoot +mybatis
SpringBoot + mybatis(SpringBoot 集成mybatis)实现SpringBoot 快速搭建
springboot和mybatis
springboot和mybatis整合
【Mybatis】——JDBC
全称: JDBC:Java DataBaseConnectivity Java数据库编程接口,SUN 公司为了简化、统一数据库的操作,定义了一套 Java操作数据库的规范,称之为 JDBC。JDBC 是一套接口,并不能真正操作数据库,而各个数据库的驱动是 JDBC 的实现,用来对数据库的操作。JDBC代表Java数据库连接,与数据库驱动的关系就像接口和实现的关系。   四个核心对象
springboot的起步依赖
加载自动配置的方式2: springboot读取配置文件的方式: 1、读取核心配置文件 核心配置文件是指在resources根目录下的application.properties或application.yml配置文件,读取这两个配置文件的方法有两种,都比较简单。 方式一:使用**@Value方式(常用);在@Value的${}**中包含的是核心配置文件中的键名 方式二:使用Environment...
springboot依赖问题
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'scanController': Unsa...
SpringBoot使用起步依赖
SpringBoot之所以能大大简化配置的繁琐程度,很大一部分是因为使用了起步依赖,SpringBoot遵循约定大于配置的原则,在创建项目的时候会自动引入相关依赖,即起步依赖。 如何制定基于功能的依赖呢,如图  在创建项目时可以选择需要的功能,随后项目会自动导入相关功能依赖,举例来说,你打算创建一个web应用,那么不需要添加众多的单独库依赖,只需要添加Spring  Boot的Web起步依赖就...
Springboot创建web项目之 eclipse手动创建maven项目后再添加Springboot依赖
一、环境 操作系统:windows7 IDE : Eclipse Photon Release (4.8.0) JDK : JDK1.8 二、创建maven项目 File -> New -> Other… -> 搜索maven -> Next -> Next -> 选择maven archetype类型 ->Next -> 设置Group Id...
SpringBoot依赖积累
表 1. Spring Boot 推荐的基础 POM 文件 名称 说明 spring-boot-starter 核心 POM,包含自动配置支持、日志库和对 YAML 配置文件的支持。 spring-boot-starter-amqp 通过 spring-rabbit 支持 AMQP。 spring-boot-st
Springboot循环依赖解决办法
版权声明:本文为博主原创文章,未经博主允许不得转载。 最近在使用Spingboot做项目的时候,在引入shiro后,启动项目一直报错 Error creating bean with name 'debtServiceImpl': Bean with name 'debtServiceImpl' has been injected into other beans [repayBill
SpringBoot依赖及其作用
下列pom采用从父依赖继承版本的方式:Spring Boot 父依赖如下: parent> groupId>org.springframework.bootgroupId> artifactId>spring-boot-starter-parentartifactId> version>1.5.6.RELEASEversion>
springboot的测试类的maven依赖
[quote] junit junit 4.12 org.springframework.boot spring-boot-starter-test test 2.0.2.RELEASE ...
SpringBoot起步依赖收集
本文内容来源《第一行代码》第2版,郭霖著。 1.1 了解全貌 1.1.1 Android系统架构 1.Linux内核层:Android系统是基于Linux内核的,这一层为Android设备的各种硬件提供了底层的驱动,如显示驱动、音频驱动等。 2.系统运行库层:这一层通过一些C/C++库来为Android系统提供了主要的特性支持。如SQLite提供了数据库的支持,Webkit库提供了浏览...
springboot热部署maven依赖
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> &amp
SpringBoot注解循环依赖
SpringBoot注解循环依赖 今天在进行redis链接池配置代码时,运行测试时发现了一个循环依赖问题,在此记录下 问题所在 由于我在同一个类中对redis链接池进行配置,使用@Bean将返回的链接池对象(jedisPool)配置到IOC容器中,不过由于,同时又使用@Autowired将该IOC容器的对象(jedisPool)注入到依赖的成员变量中,导致了循环依赖错误。 @Service...
elasticsearch6.3的jdbc依赖
jdbc连接elasticsearch6.3所需要的依赖压缩包,qqqqqq
c3p0.jar和依赖jdbc
C3P0数据库连接池jar包,用于开发JAVA的后台数据库连接
相关热词 c# 标准差 计算 c#siki第五季 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池