idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

2019-08-08 00:00:00 报错 启动 发布

1、异常如下:

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》
《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

  1 Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
  2 2019-06-20 16:09:01.641 ERROR 15404 --- [on(3)-127.0.0.1] o.s.b.d.LoggingFailureAnalysisReporter   : 
  3 
  4 ***************************
  5 APPLICATION FAILED TO START
  6 ***************************
  7 
  8 Description:
  9 
 10 A component required a bean of type 'com.boot.mapper.UserMapper' that could not be found.
 11 
 12 
 13 Action:
 14 
 15 Consider defining a bean of type 'com.boot.mapper.UserMapper' in your configuration.
 16 
 17 20-Jun-2019 16:09:01.642 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [manageApp]
 18  java.lang.IllegalStateException: Error starting child
 19     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716)
 20     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
 21     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
 22     at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1729)
 23     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 24     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 25     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 26     at java.lang.reflect.Method.invoke(Method.java:498)
 27     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
 28     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
 29     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
 30     at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457)
 31     at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406)
 32     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 33     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 34     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 35     at java.lang.reflect.Method.invoke(Method.java:498)
 36     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
 37     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
 38     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
 39     at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
 40     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
 41     at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
 42     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
 43     at java.security.AccessController.doPrivileged(Native Method)
 44     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
 45     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
 46     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 47     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 48     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 49     at java.lang.reflect.Method.invoke(Method.java:498)
 50     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
 51     at sun.rmi.transport.Transport$1.run(Transport.java:200)
 52     at sun.rmi.transport.Transport$1.run(Transport.java:197)
 53     at java.security.AccessController.doPrivileged(Native Method)
 54     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
 55     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
 56     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
 57     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
 58     at java.security.AccessController.doPrivileged(Native Method)
 59     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
 60     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 61     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 62     at java.lang.Thread.run(Thread.java:745)
 63 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testBoot]]
 64     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
 65     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
 66     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
 67     ... 43 more
 68 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testBootController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
 69     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
 70     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1225)
 71     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:552)
 72     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
 73     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 74     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 75     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 76     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 77     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
 78     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
 79     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
 80     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
 81     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
 82     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
 83     at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
 84     at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
 85     at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
 86     at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
 87     at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
 88     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5125)
 89     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
 90     ... 44 more
 91 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
 92     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
 93     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1225)
 94     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:552)
 95     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
 96     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 97     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 98     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 99     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
100     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522)
101     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
102     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
103     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
104     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
105     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
106     ... 64 more
107 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
108     at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1474)
109     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
110     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
111     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:518)
112     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
113     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
114     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
115     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
116     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
117     ... 77 more
118 
119 20-Jun-2019 16:09:01.648 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [createStandardContext]
120  javax.management.RuntimeOperationsException: Exception invoking method [manageApp]
121     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:298)
122     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
123     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
124     at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457)
125     at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406)
126     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
127     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
128     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
129     at java.lang.reflect.Method.invoke(Method.java:498)
130     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
131     at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
132     at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
133     at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468)
134     at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468)
135     at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
136     at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
137     at java.security.AccessController.doPrivileged(Native Method)
138     at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408)
139     at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829)
140     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
141     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
142     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
143     at java.lang.reflect.Method.invoke(Method.java:498)
144     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324)
145     at sun.rmi.transport.Transport$1.run(Transport.java:200)
146     at sun.rmi.transport.Transport$1.run(Transport.java:197)
147     at java.security.AccessController.doPrivileged(Native Method)
148     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
149     at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
150     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
151     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
152     at java.security.AccessController.doPrivileged(Native Method)
153     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
154     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
155     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
156     at java.lang.Thread.run(Thread.java:745)
157 Caused by: java.lang.IllegalStateException: Error starting child
158     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:716)
159     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
160     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
161     at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1729)
162     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
163     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
164     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
165     at java.lang.reflect.Method.invoke(Method.java:498)
166     at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289)
167     ... 35 more
168 Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/testBoot]]
169     at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
170     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
171     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
172     ... 43 more
173 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testBootController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
174     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
175     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1225)
176     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:552)
177     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
178     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
179     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
180     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
181     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
182     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759)
183     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
184     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
185     at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
186     at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761)
187     at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371)
188     at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
189     at org.springframework.boot.web.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:151)
190     at org.springframework.boot.web.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:131)
191     at org.springframework.boot.web.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:86)
192     at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
193     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5125)
194     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
195     ... 44 more
196 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
197     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:321)
198     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1225)
199     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:552)
200     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
201     at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
202     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
203     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
204     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
205     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:522)
206     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
207     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
208     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
209     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
210     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
211     ... 64 more
212 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.boot.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.annotation.Resource(shareable=true, lookup=, name=, description=, authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}
213     at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1474)
214     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1102)
215 [2019-06-20 04:09:01,677] Artifact testBoot: Error during artifact deployment. See server log for details.
216     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
217     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:518)
218     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:496)
219     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:627)
220     at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169)
221     at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
222     at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:318)
223     ... 77 more

异常

 

2、在idea下直接运行可以成功:

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

启动日志:

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》
《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:60107,suspend=y,server=n -javaagent:C:\Users\YE\.IntelliJIdea2019.1\system\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;F:\IntelliJ IDEA_WorkSpace\testBoot\target\classes;F:\maven-repository\org\springframework\boot\spring-boot-starter\1.4.3.RELEASE\spring-boot-starter-1.4.3.RELEASE.jar;F:\maven-repository\org\springframework\boot\spring-boot\1.4.3.RELEASE\spring-boot-1.4.3.RELEASE.jar;F:\maven-repository\org\springframework\spring-context\4.3.5.RELEASE\spring-context-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\boot\spring-boot-autoconfigure\1.4.3.RELEASE\spring-boot-autoconfigure-1.4.3.RELEASE.jar;F:\maven-repository\org\springframework\boot\spring-boot-starter-logging\1.4.3.RELEASE\spring-boot-starter-logging-1.4.3.RELEASE.jar;F:\maven-repository\ch\qos\logback\logback-classic\1.1.8\logback-classic-1.1.8.jar;F:\maven-repository\ch\qos\logback\logback-core\1.1.8\logback-core-1.1.8.jar;F:\maven-repository\org\slf4j\jcl-over-slf4j\1.7.22\jcl-over-slf4j-1.7.22.jar;F:\maven-repository\org\slf4j\jul-to-slf4j\1.7.22\jul-to-slf4j-1.7.22.jar;F:\maven-repository\org\slf4j\log4j-over-slf4j\1.7.22\log4j-over-slf4j-1.7.22.jar;F:\maven-repository\org\springframework\spring-core\4.3.5.RELEASE\spring-core-4.3.5.RELEASE.jar;F:\maven-repository\org\yaml\snakeyaml\1.17\snakeyaml-1.17.jar;F:\maven-repository\org\slf4j\slf4j-api\1.7.22\slf4j-api-1.7.22.jar;F:\maven-repository\org\springframework\boot\spring-boot-starter-web\1.4.3.RELEASE\spring-boot-starter-web-1.4.3.RELEASE.jar;F:\maven-repository\org\springframework\boot\spring-boot-starter-tomcat\1.4.3.RELEASE\spring-boot-starter-tomcat-1.4.3.RELEASE.jar;F:\maven-repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.6\tomcat-embed-core-8.5.6.jar;F:\maven-repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.6\tomcat-embed-el-8.5.6.jar;F:\maven-repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.6\tomcat-embed-websocket-8.5.6.jar;F:\maven-repository\org\hibernate\hibernate-validator\5.2.4.Final\hibernate-validator-5.2.4.Final.jar;F:\maven-repository\javax\validation\validation-api\1.1.0.Final\validation-api-1.1.0.Final.jar;F:\maven-repository\org\jboss\logging\jboss-logging\3.3.0.Final\jboss-logging-3.3.0.Final.jar;F:\maven-repository\com\fasterxml\classmate\1.3.3\classmate-1.3.3.jar;F:\maven-repository\com\fasterxml\jackson\core\jackson-databind\2.8.5\jackson-databind-2.8.5.jar;F:\maven-repository\com\fasterxml\jackson\core\jackson-annotations\2.8.5\jackson-annotations-2.8.5.jar;F:\maven-repository\com\fasterxml\jackson\core\jackson-core\2.8.5\jackson-core-2.8.5.jar;F:\maven-repository\org\springframework\spring-web\4.3.5.RELEASE\spring-web-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\spring-aop\4.3.5.RELEASE\spring-aop-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\spring-beans\4.3.5.RELEASE\spring-beans-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\spring-webmvc\4.3.5.RELEASE\spring-webmvc-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\spring-expression\4.3.5.RELEASE\spring-expression-4.3.5.RELEASE.jar;F:\maven-repository\org\mybatis\spring\boot\mybatis-spring-boot-starter\1.1.1\mybatis-spring-boot-starter-1.1.1.jar;F:\maven-repository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\1.1.1\mybatis-spring-boot-autoconfigure-1.1.1.jar;F:\maven-repository\org\springframework\boot\spring-boot-starter-jdbc\1.4.3.RELEASE\spring-boot-starter-jdbc-1.4.3.RELEASE.jar;F:\maven-repository\org\apache\tomcat\tomcat-jdbc\8.5.6\tomcat-jdbc-8.5.6.jar;F:\maven-repository\org\apache\tomcat\tomcat-juli\8.5.6\tomcat-juli-8.5.6.jar;F:\maven-repository\org\springframework\spring-jdbc\4.3.5.RELEASE\spring-jdbc-4.3.5.RELEASE.jar;F:\maven-repository\org\springframework\spring-tx\4.3.5.RELEASE\spring-tx-4.3.5.RELEASE.jar;F:\maven-repository\mysql\mysql-connector-java\5.1.38\mysql-connector-java-5.1.38.jar;F:\maven-repository\org\springframework\boot\spring-boot-devtools\1.4.3.RELEASE\spring-boot-devtools-1.4.3.RELEASE.jar;F:\maven-repository\org\mybatis\mybatis-spring\1.3.2\mybatis-spring-1.3.2.jar;F:\maven-repository\org\mybatis\mybatis\3.4.6\mybatis-3.4.6.jar;D:\newtools\IntelliJ IDEA\lib\idea_rt.jar" com.Application
Connected to the target VM, address: '127.0.0.1:60107', transport: 'socket'

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.3.RELEASE)

2019-06-20 16:25:38.903  INFO 9972 --- [  restartedMain] com.Application                          : Starting Application on YE-PC with PID 9972 (started by YE in F:\IntelliJ IDEA_WorkSpace\testBoot)
2019-06-20 16:25:38.906  INFO 9972 --- [  restartedMain] com.Application                          : No active profile set, falling back to default profiles: default
2019-06-20 16:25:38.967  INFO 9972 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6d530a7c: startup date [Thu Jun 20 16:25:38 CST 2019]; root of context hierarchy
2019-06-20 16:25:41.336  WARN 9972 --- [  restartedMain] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'userMapper' and 'com.boot.mapper.UserMapper' mapperInterface. Bean already defined with the same name!
2019-06-20 16:25:41.336  WARN 9972 --- [  restartedMain] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[com.boot.mapper]' package. Please check your configuration.
2019-06-20 16:25:41.727  INFO 9972 --- [  restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$adf1a3f5] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-06-20 16:25:42.201  INFO 9972 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8090 (http)
2019-06-20 16:25:42.213  INFO 9972 --- [  restartedMain] o.apache.catalina.core.StandardService   : Starting service Tomcat
2019-06-20 16:25:42.214  INFO 9972 --- [  restartedMain] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.6
2019-06-20 16:25:42.293  INFO 9972 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-06-20 16:25:42.293  INFO 9972 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3330 ms
2019-06-20 16:25:42.438  INFO 9972 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2019-06-20 16:25:42.442  INFO 9972 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-06-20 16:25:42.443  INFO 9972 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-06-20 16:25:42.443  INFO 9972 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-06-20 16:25:42.443  INFO 9972 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-06-20 16:25:43.036  INFO 9972 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@6d530a7c: startup date [Thu Jun 20 16:25:38 CST 2019]; root of context hierarchy
2019-06-20 16:25:43.096  INFO 9972 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testboot/hi],methods=[GET]}" onto public java.lang.String com.boot.controller.TestBootController.index()
2019-06-20 16:25:43.097  INFO 9972 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testboot/users/{userId}]}" onto public java.util.List<com.boot.dto.User> com.boot.controller.TestBootController.getUser(int)
2019-06-20 16:25:43.099  INFO 9972 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-06-20 16:25:43.099  INFO 9972 --- [  restartedMain] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-06-20 16:25:43.130  INFO 9972 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:25:43.130  INFO 9972 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:25:43.169  INFO 9972 --- [  restartedMain] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:25:43.475  INFO 9972 --- [  restartedMain] o.s.b.d.a.OptionalLiveReloadServer       : LiveReload server is running on port 35729
2019-06-20 16:25:43.590  INFO 9972 --- [  restartedMain] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-06-20 16:25:43.639  INFO 9972 --- [  restartedMain] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8090 (http)
2019-06-20 16:25:43.644  INFO 9972 --- [  restartedMain] com.Application                          : Started Application in 5.327 seconds (JVM running for 5.765)

启动日志

说明代码一定没有问题。

然后在网上找了很久,大家都说是注解问题,但是我确信自己的注解是对的,终于在一篇博客(https://segmentfault.com/q/1010000013279965)的的留言中看到有人遇到了同样的问题:

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

3、IDEA发布应用时,lib里面的jar包不全是一个比较常见问题,操作如下

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

4、成功

《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》
《idea内启动正常,发布外部tomcat启动报错:Field userMapper in XX required a bean of type 'xx' that could not be found.》

D:\newtools\apache-tomcat-9.0.16\bin\catalina.bat run
[2019-06-20 04:39:02,666] Artifact testBoot: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE:   "C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot"
Using CATALINA_HOME:   "D:\newtools\apache-tomcat-9.0.16"
Using CATALINA_TMPDIR: "C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_111"
Using CLASSPATH:       "D:\newtools\apache-tomcat-9.0.16\bin\bootstrap.jar;D:\newtools\apache-tomcat-9.0.16\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:53599', transport: 'socket'
20-Jun-2019 16:39:03.691 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本:        Apache Tomcat/9.0.16
20-Jun-2019 16:39:03.695 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.构建:          Feb 4 2019 16:30:29 UTC
20-Jun-2019 16:39:03.695 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.16.0
20-Jun-2019 16:39:03.695 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
20-Jun-2019 16:39:03.695 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本:            6.1
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 结.造:          amd64
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量:             C:\Program Files\Java\jdk1.8.0_111\jre
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本:           1.8.0_111-b14
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商:            Oracle Corporation
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\newtools\apache-tomcat-9.0.16
20-Jun-2019 16:39:03.696 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot\conf\logging.properties
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53599,suspend=y,server=n
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\YE\.IntelliJIdea2019.1\system\captureAgent\debugger-agent.jar
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot\jmxremote.password
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot\jmxremote.access
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
20-Jun-2019 16:39:03.697 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot
20-Jun-2019 16:39:03.700 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\newtools\apache-tomcat-9.0.16
20-Jun-2019 16:39:03.700 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Users\YE\.IntelliJIdea2019.1\system\tomcat\Tomcat_9_0_16_testBoot\temp
20-Jun-2019 16:39:03.700 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.21] using APR version [1.6.5].
20-Jun-2019 16:39:03.700 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
20-Jun-2019 16:39:03.700 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
20-Jun-2019 16:39:03.704 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1a  20 Nov 2018]
20-Jun-2019 16:39:03.798 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8090"]
20-Jun-2019 16:39:03.820 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8099"]
20-Jun-2019 16:39:03.824 信息 [main] org.apache.catalina.startup.Catalina.load 服务器在[396]毫秒内初始化
20-Jun-2019 16:39:03.854 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
20-Jun-2019 16:39:03.854 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.16]
20-Jun-2019 16:39:03.863 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8090"]
20-Jun-2019 16:39:03.911 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8099"]
20-Jun-2019 16:39:03.915 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in [90] milliseconds
Connected to server
[2019-06-20 04:39:04,215] Artifact testBoot: Artifact is being deployed, please wait...

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.3.RELEASE)

2019-06-20 16:39:06.917  INFO 15744 --- [on(3)-127.0.0.1] com.SpringBootStartApplication           : Starting SpringBootStartApplication on YE-PC with PID 15744 (started by YE in D:\newtools\apache-tomcat-9.0.16\bin)
2019-06-20 16:39:06.921  INFO 15744 --- [on(3)-127.0.0.1] com.SpringBootStartApplication           : No active profile set, falling back to default profiles: default
2019-06-20 16:39:06.959  INFO 15744 --- [on(3)-127.0.0.1] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39e96d71: startup date [Thu Jun 20 16:39:06 CST 2019]; root of context hierarchy
2019-06-20 16:39:09.006  WARN 15744 --- [on(3)-127.0.0.1] o.m.s.mapper.ClassPathMapperScanner      : Skipping MapperFactoryBean with name 'userMapper' and 'com.boot.mapper.UserMapper' mapperInterface. Bean already defined with the same name!
2019-06-20 16:39:09.007  WARN 15744 --- [on(3)-127.0.0.1] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[com.boot.mapper]' package. Please check your configuration.
2019-06-20 16:39:09.523  INFO 15744 --- [on(3)-127.0.0.1] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$ac8e7a90] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-06-20 16:39:09.578  INFO 15744 --- [on(3)-127.0.0.1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2619 ms
2019-06-20 16:39:10.473  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2019-06-20 16:39:10.475  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'errorPageFilter' to: [/*]
2019-06-20 16:39:10.476  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-06-20 16:39:10.476  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-06-20 16:39:10.476  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-06-20 16:39:10.476  INFO 15744 --- [on(3)-127.0.0.1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2019-06-20 16:39:12.561  INFO 15744 --- [on(3)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@39e96d71: startup date [Thu Jun 20 16:39:06 CST 2019]; root of context hierarchy
2019-06-20 16:39:12.654  INFO 15744 --- [on(3)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testboot/hi],methods=[GET]}" onto public java.lang.String com.boot.controller.TestBootController.index()
2019-06-20 16:39:12.655  INFO 15744 --- [on(3)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/testboot/users/{userId}]}" onto public java.util.List<com.boot.dto.User> com.boot.controller.TestBootController.getUser(int)
2019-06-20 16:39:12.657  INFO 15744 --- [on(3)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-06-20 16:39:12.657  INFO 15744 --- [on(3)-127.0.0.1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-06-20 16:39:12.705  INFO 15744 --- [on(3)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:39:12.705  INFO 15744 --- [on(3)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:39:12.772  INFO 15744 --- [on(3)-127.0.0.1] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-20 16:39:13.209  INFO 15744 --- [on(3)-127.0.0.1] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2019-06-20 16:39:13.222  INFO 15744 --- [on(3)-127.0.0.1] com.SpringBootStartApplication           : Started SpringBootStartApplication in 7.205 seconds (JVM running for 10.17)
2019-06-20 16:39:13.290  INFO 15744 --- [on(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner     : 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
[2019-06-20 04:39:13,317] Artifact testBoot: Artifact is deployed successfully
[2019-06-20 04:39:13,318] Artifact testBoot: Deploy took 9,102 milliseconds
20-Jun-2019 16:39:13.866 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\newtools\apache-tomcat-9.0.16\webapps\docs]
20-Jun-2019 16:39:13.910 信息 [Catalina-utility-2] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
20-Jun-2019 16:39:13.912 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\newtools\apache-tomcat-9.0.16\webapps\docs] has finished in [46] ms
20-Jun-2019 16:39:13.913 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\newtools\apache-tomcat-9.0.16\webapps\host-manager]
20-Jun-2019 16:39:13.960 信息 [Catalina-utility-2] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
20-Jun-2019 16:39:13.967 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\newtools\apache-tomcat-9.0.16\webapps\host-manager] has finished in [54] ms
20-Jun-2019 16:39:13.967 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [D:\newtools\apache-tomcat-9.0.16\webapps\ROOT]
20-Jun-2019 16:39:14.006 信息 [Catalina-utility-2] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
20-Jun-2019 16:39:14.008 信息 [Catalina-utility-2] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\newtools\apache-tomcat-9.0.16\webapps\ROOT] has finished in [41] ms
2019-06-20 16:39:30.606  INFO 15744 --- [nio-8090-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2019-06-20 16:39:30.632  INFO 15744 --- [nio-8090-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 25 ms

成功日志

 

相关文章