Springboot项目部署服务器报错 5C

我的一个maven项目集成了springboot,线下使用的时候没有问题,打成jar包部署到线上出现了这个问题。
mongo用户名,密码,数据库都已经配置,但是获取到的MongoTemplate实例指向的是test,而且没有通过授权.
org.springframework.data.mongodb.UncategorizedMongoDbException: Query failed with error code 13 and error message 'not authorized on test to execute command { find: "c_player", filter: { _id: 10 }, limit: 1, singleBatch: true }' on server localhost:27017; nested exception is com.mongodb.MongoQueryException: Query failed with error code 13 and error message 'not authorized on test to execute command { find: "c_player", filter: { _id: 10 }, limit: 1, singleBatch: true }' on server localhost:27017

2个回答

表示没有权限,那就赶紧添加用户吧

切换到admin库

use admin;

添加用户
db.createUser( {
user: "sa",
pwd: "sa",
roles: [ { role: "root", db: "admin" } ]
});

既然已经添加了用户

用sa账号登录

db.auth('sa','sa');

默认配置下就可以通过http://localhost:8080/war包名/@RequestMapping.value访问了, 另外部署到tomcat后静态资源(resources下的js文件)访问不到的问题还没解决。。。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Python+OpenCV计算机视觉

Python+OpenCV计算机视觉

springboot项目部署到服务器,单独的模块无法部署

1、问题:在将springboot项目部署到服务器时,会将每一个模块打包成jar包,但是执行java -jar /usr/local/xxx.jar命令时,会报 Error creating bean with name 'entityManagerFactory' defined in class path resource的错误。但是在idea上,启动这个模块是不会报错的,请问这应该怎么部署这种模块之间有关联的spring项目?

求JBoss大神帮忙,springBoot项目,部署tomcat没问题。部署jboss就报错

jdk1.8 jboss-eap-7.2 报错信息: ![图片说明](https://img-ask.csdn.net/upload/202005/14/1589443851_835180.png) ``` 2020-05-14 15:28:50,968 INFO [tk.mybatis.mapper.autoconfigure.MapperCacheDisabler] (ServerService Thread Pool -- 87) Clear tk.mybatis.mapper.version.VersionUtil CACHE cache. 2020-05-14 15:28:50,968 INFO [tk.mybatis.mapper.autoconfigure.MapperCacheDisabler] (ServerService Thread Pool -- 87) Clear EntityHelper entityTableMap cache. 2020-05-14 15:28:51,372 INFO [org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler] (ServerService Thread Pool -- 87) Initializing ExecutorService 'taskScheduler' 2020-05-14 15:28:51,594 INFO [org.springframework.integration.endpoint.EventDrivenConsumer] (ServerService Thread Pool -- 87) Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel 2020-05-14 15:28:51,594 INFO [org.springframework.integration.channel.PublishSubscribeChannel] (ServerService Thread Pool -- 87) Channel 'application.errorChannel' has 1 subscriber(s). 2020-05-14 15:28:51,597 INFO [org.springframework.integration.endpoint.EventDrivenConsumer] (ServerService Thread Pool -- 87) started _org.springframework.integration.errorLogger 2020-05-14 15:28:51,599 INFO [org.springframework.scheduling.quartz.SchedulerFactoryBean] (ServerService Thread Pool -- 87) Starting Quartz Scheduler now 2020-05-14 15:28:51,663 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 87) ClusterManager: detected 1 failed or restarted instances. 2020-05-14 15:28:51,663 INFO [org.springframework.scheduling.quartz.LocalDataSourceJobStore] (ServerService Thread Pool -- 87) ClusterManager: Scanning for instance "DESKTOP-C8VU1M31589441150514"'s failed in-progress jobs. 2020-05-14 15:28:51,705 INFO [org.quartz.core.QuartzScheduler] (ServerService Thread Pool -- 87) Scheduler schedulerFactoryBean_$_DESKTOP-C8VU1M31589441328257 started. 2020-05-14 15:28:51,725 INFO [com.travelsky.ServletInitializer] (ServerService Thread Pool -- 87) Started ServletInitializer in 9.172 seconds (JVM running for 29.237) 2020-05-14 15:28:51,767 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 87) 初始化上下文 '/cscm' 的 Mojarra 2.3.5.SP2-redhat-00001 2020-05-14 15:28:58,000 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 87) Critical error during deployment: : java.lang.NullPointerException at javax.el.CompositeELResolver.add(CompositeELResolver.java:117) at com.sun.faces.el.DemuxCompositeELResolver.addRootELResolver(DemuxCompositeELResolver.java:142) at com.sun.faces.el.ELUtils.addEL3_0_Resolvers(ELUtils.java:336) at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:258) at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:503) at com.sun.faces.application.ApplicationImpl.performOneTimeELInitialization(ApplicationImpl.java:1405) at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:529) at javax.faces.application.ApplicationWrapper.getELResolver(ApplicationWrapper.java:621) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:256) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:216) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485) 2020-05-14 15:28:58,004 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 87) MSC000001: Failed to start service jboss.deployment.unit."cscm.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.unit."cscm.war".undertow-deployment: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78) ... 8 more Caused by: java.lang.RuntimeException: java.lang.NullPointerException at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:315) at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:187) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:216) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250) ... 10 more Caused by: java.lang.NullPointerException at javax.el.CompositeELResolver.add(CompositeELResolver.java:117) at com.sun.faces.el.DemuxCompositeELResolver.addRootELResolver(DemuxCompositeELResolver.java:142) at com.sun.faces.el.ELUtils.addEL3_0_Resolvers(ELUtils.java:336) at com.sun.faces.el.ELUtils.buildFacesResolver(ELUtils.java:258) at com.sun.faces.application.ApplicationAssociate.initializeELResolverChains(ApplicationAssociate.java:503) at com.sun.faces.application.ApplicationImpl.performOneTimeELInitialization(ApplicationImpl.java:1405) at com.sun.faces.application.ApplicationImpl.getELResolver(ApplicationImpl.java:529) at javax.faces.application.ApplicationWrapper.getELResolver(ApplicationWrapper.java:621) at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:256) ... 21 more 2020-05-14 15:28:58,011 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: 操作("deploy") 失败 -- 地址:([("deployment" => "cscm.war")])-- 失败操作:{"WFLYCTL0080: 失败的服务" => {"jboss.deployment.unit.\"cscm.war\".undertow-deployment" => "java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException Caused by: java.lang.RuntimeException: java.lang.NullPointerException Caused by: java.lang.NullPointerException"}} 2020-05-14 15:28:58,019 INFO [org.jboss.as.server] (ServerService Thread Pool -- 42) WFLYSRV0010: 已部署的 "cscm.war"(runtime-name: "cscm.war") 2020-05-14 15:28:58,020 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: 服务状态报告 WFLYCTL0186: 启动失败的服务: service jboss.deployment.unit."cscm.war".undertow-deployment: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException 2020-05-14 15:28:58,058 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: 恢复服务器 2020-05-14 15:28:58,060 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: 侦听 http://0.0.0.0:9990/management 的 HTTP 管理接口 2020-05-14 15:28:58,060 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: 管理控制台侦听于 http://0.0.0.0:9990 2020-05-14 15:28:58,063 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: JBoss EAP 7.2.1.GA (WildFly Core 6.0.12.Final-redhat-00001) started (with errors) in 35479ms - Started 570 of 758 services (2 services failed or missing dependencies, 327 services are lazy, passive or on-demand) 2020-05-14 15:38:23,596 INFO [org.jboss.as.repository] (ServerService Thread Pool -- 94) WFLYDR0009: 内容 D:\jboss\jboss-eap-7.2\standalone\data ```

linux部署springboot项目的问题

![图片说明](https://img-ask.csdn.net/upload/201801/16/1516082219_509397.png) 如图所示,我的项目结构,lib包里放的依赖jar包,resources包内放的配置文件,现在要部署到linux服务器上去,启动和关闭的sh脚本应该怎么写? 我的启动脚本如下,但是没有启动成功. ``` JARS="resources" LIB="lib" if [ -d $LIB ]; then for i in $LIB/*.jar; do JARS="$JARS":$i done fi JARS="$JARS":"FillDataService.jar" JARS="$JARS":"./" echo "JARS:$JARS" echo "LIB:$LIB" export JARS java -Xms2048M -Xmx6144M -XX:MaxPermSize=256m -Dprogram.name=FillDataService -Dfile.encoding=utf-8 -cp $JARS com.westcredit.main ```

springboot项目启动时注册监听器,使用springboot内置tomcat启动OK,打包部署后监听没反应不报错

springboot项目启动时注册监听器,使用springboot内置tomcat启动OK,打包部署后监听没反应不报错,排查了很久就是找不到问题,求助各位大神。 下面附正常(启动成功图)图和部署启动图: ![监听加载成功会输入如下信息](https://img-ask.csdn.net/upload/201809/25/1537865242_478789.jpg) 下面是部署到服务器的日志输出,项目名称为ROOT(只要关注这个项目就好了),未输出监听日志,说明监听没有启动 ![这是部署到服务器的启动日志图,监听未启动](https://img-ask.csdn.net/upload/201809/25/1537865021_734628.jpg) 跪求大神们指点

用main方法启动成功,但是用外置tomacat启动spring boot项目报错

用main方法启动成功,但是用外置tomacat启动spring boot项目报xia'm错: 2020-02-11 19:33:30.588 INFO 12292 --- [on(2)-127.0.0.1] com.wisezone.docker.api.TestDemo : No active profile set, falling back to default profiles: default 2020-02-11 19:33:30.983 WARN 12292 --- [on(2)-127.0.0.1] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.wisezone.docker.api.TestDemo]; nested exception is java.io.FileNotFoundException: class path resource [common/controller/BaseController.class] cannot be opened because it does not exist 2020-02-11 19:33:31.090 ERROR 12292 --- [on(2)-127.0.0.1] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.wisezone.docker.api.TestDemo]; nested exception is java.io.FileNotFoundException: class path resource [common/controller/BaseController.class] cannot be opened because it does not exist at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92) [spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) [spring-web-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) [catalina.jar:9.0.24] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) [catalina.jar:9.0.24] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) [catalina.jar:9.0.24] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) [catalina.jar:9.0.24] 11-Feb-2020 19:33:31.092 严重 [RMI TCP Connection(2)-127.0.0.1] org.apache.tomcat.util.modeler.BaseModelMBean.invoke Exception invoking method [manageApp] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) [catalina.jar:9.0.24] java.lang.IllegalStateException: Error starting child at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728) [catalina.jar:9.0.24] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1728) at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) [tomcat-coyote.jar:9.0.24] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457) [catalina.jar:9.0.24] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406) [catalina.jar:9.0.24] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:457) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:406) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) [tomcat-coyote.jar:9.0.24] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) [na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) [na:1.8.0_91] at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:289) at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) [na:1.8.0_91] at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) [na:1.8.0_91] at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91] at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) [na:1.8.0_91] at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1468) at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) [na:1.8.0_91] at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at java.security.AccessController.doPrivileged(Native Method) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1408) at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) [na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.rmi.transport.Transport$1.run(Transport.java:200) [na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.rmi.transport.Transport$1.run(Transport.java:197) [na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) [na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) [na:1.8.0_91] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:324) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) [na:1.8.0_91] at sun.rmi.transport.Transport$1.run(Transport.java:200) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) [na:1.8.0_91] at sun.rmi.transport.Transport$1.run(Transport.java:197) at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_91] at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) [na:1.8.0_91] at sun.rmi.transport.Transport.serviceCall(Transport.java:196) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_91] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_91] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826) at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683) Caused by: java.io.FileNotFoundException: class path resource [common/controller/BaseController.class] cannot be opened because it does not exist at java.security.AccessController.doPrivileged(Native Method) at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682) at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/docker_api_war_exploded]] at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440) at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) ~[spring-boot-2.2.4.RELEASE.jar:2.2.4.RELEASE] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[spring-core-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717) at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:686) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] ... 43 more at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:994) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [com.wisezone.docker.api.TestDemo]; nested exception is java.io.FileNotFoundException: class path resource [common/controller/BaseController.class] cannot be opened because it does not exist at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:335) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:184) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:194) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:298) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) ~[spring-context-5.2.3.RELEASE.jar:5.2.3.RELEASE] ... 60 common frames omitted at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:152) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:132) at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:92) at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:172) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5135) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ... 44 more Caused by: java.io.FileNotFoundException: class path resource [common/controller/BaseController.class] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) at org.springframework.core.type.classreading.SimpleMetadataReader.getClassReader(SimpleMetadataReader.java:56) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:50) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:86) at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:73) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:686) at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:994) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:335) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:194) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:298) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:245) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) ... 60 more

SpringBoot整合WebService时启动项目报错

Caused by: java.lang.ClassNotFoundException: org.springframework.xml.transform.TransformerObjectSupport at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 73 more 但是在依赖包里能找到这个类: ![图片说明](https://img-ask.csdn.net/upload/201711/27/1511770183_332202.png) 有没有大神教我一下。

在windows环境下写的springboot的项目在linux的tomcat下运行报错

看了日志发现报错 g.apache.catalina.startup.Catalina.start The required Server component failed to start so Tomcat is unable to start. org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]] 还有就是我打包的时候使用的是war exploded 求大神解答

关于spring boot部署后与本地数据库数据访问不一致的问题

spring boot 里写爬虫爬取数据。save函数思路如下:如果数据库里没有该记录就保存。 ```java if((gradeRepository.findByCourseName(grade.getCourseName()))==null){ gradeRepository.save(grade); //保存 }else{ continue; } ``` 问题:我在本地测试是没问题的,但在云服务器上部署了以后,数据会有两条缺失。 经过打印调试,发现那两条数据的if条件返回的结果是false.也就是一开始数据库里 没数据的情况下find返回的grade对象不为空……这就很奇怪了 环境说明:腾讯云Centos7.3, mysql5.6, spring boot 1.5.6RELEASE ![图片说明](https://img-ask.csdn.net/upload/201708/21/1503317039_361331.png) 请问该怎么办?谢谢!

springboot项目打包成jar之后,显示redis连接失败无法连接到192.168.5.8但是我配置文件redis配置端口是127.0.0.1这是什么情况?

如题,我的springboot中配置的redis明明是127.0.0.1的地址服务器上redis也是127.0.0.1 但是jar启动报错是 无法连接到192.168.5.8 难道是项目缓存嘛? 但是我用ide检索192.168.5.8检索不到,用的是intellij ![图片说明](https://img-ask.csdn.net/upload/201909/24/1569294513_355959.jpg) ![图片说明](https://img-ask.csdn.net/upload/201909/24/1569294523_67987.jpg)

springboot项目编译失败,无法找到主类

最近再用springcloud开发,项目结构如下 zy(父类工程,定义各模块,指定模块依赖jar版本) |------------------------------ |--config-core 核心配置类 | |-- applet-service app接口 依赖da-core | |-- manage-service 后台管理接口 依赖da-core | |-- eureka-service eureka注册中心 打包 manage-service的时候报错 ``` Failed to execute goal on project applet-service: Could not resolve dependencies for project com.zhancheng:applet-service:jar:0.0.1-SNAPSHOT: Could not find artifact com.zhancheng:config-core:jar:0.0.1-SNAPSHOT ``` 没有找到config-core,我又尝试install config-core,报错 ``` Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage (repackage) on project config-core: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.1.6.RELEASE:repackage failed: Unable to find main class ``` 没有找到主类,但是这个项目本身是没有主类的啊,主类在applet-service和manage-service. 项目是在本地能跑的,但是想打包部署到服务器上,请问应该怎么做?

打我war包在windows下部署没有报错,但是在linux上面部署报错

08:37:38 [ERROR][localhost-startStop-1][org.springframework.web.context.ContextLoader]- Context initialization failed java.lang.NoSuchMethodError: org.springframework.core.CollectionFactory.createConcurrentMapIfPossible(I)Ljava/util/Map; at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.<init>(DefaultSingletonBeanRegistry.java:82) at org.springframework.beans.factory.support.AbstractBeanFactory.<init>(AbstractBeanFactory.java:142) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:133) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.<init>(AbstractAutowireCapableBeanFactory.java:144) at org.springframework.beans.factory.support.DefaultListableBeanFactory.<init>(DefaultListableBeanFactory.java:100) at org.springframework.context.support.AbstractRefreshableApplicationContext.createBeanFactory(AbstractRefreshableApplicationContext.java:120) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:88) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:262) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:139) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:246) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:184) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4729) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5167) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:945) at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1768) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 请问,怎么解决

关于SpringBoot jar包在阿里云服务器下,上传图片的路径问题?

SpringBoot的图片上传,在本地选取图片进行上传会报错,路径图片不存在。将本地的图片放在linux指定目录下,再次使用本地相同的图片,就可以上传成功。 *************************************************************** 如图一:![图片说明](https://img-ask.csdn.net/upload/201903/08/1552027843_267360.png) 打印的路径为Linux的usr/java,并且这张图片存在Linux指定包下。 ****************** 如图二:![图片说明](https://img-ask.csdn.net/upload/201903/08/1552027930_890265.png) 这样报错就是在windows下选取图片后,这张图片没有在Linux指定包内 ******************************************************** 请问:如何在本地选取的图片同时在Linux的目录下也存在同样的图片,或者有更好的解决办法,还请赐教。谢谢各位大佬!!!!!

java项目 为什么项目本地有用 部署到服务器就显示不出来了

java项目 为什么项目本地有用 部署到服务器就显示不出来了 本地的效果: ![图片说明](https://img-ask.csdn.net/upload/201704/25/1493107758_575609.png) 部署服务器后效果: ![图片说明](https://img-ask.csdn.net/upload/201704/25/1493107776_39807.png)

Springboot配置了Swagger但是无法访问swagger-ui,报错401

Springboot配置了Swagger2,但是访问的话就报401,配置如下 ![图片说明](https://img-ask.csdn.net/upload/202005/24/1590306500_531690.png) 配置有错的话请各位指点 错误如下 ![图片说明](https://img-ask.csdn.net/upload/202005/24/1590306571_997960.png) ![图片说明](https://img-ask.csdn.net/upload/202005/24/1590306638_458590.png) 搜很多也没有解决办法,希望有大佬给出意见

SpringBoot在IDE可以正常运行,但是部署到Tomcat里就会启动失败

我打算使用spring-boot + mybits plus构建一个RESTful服务器,在Eclipse里可以正常运行。但是一旦打包放到Tomcat里就会出现如下错误(NoSuchBeanDefinition),个人推测是某些配置文件没写完整或者有错误,导致的实例注入失败。 不过我检查了很多遍,尝试了很多办法,依然还是会有这个问题。 请各路大神帮帮忙!! 目录结构: java-xxx.xxx.xxx.xxx.dao |-xxx.xxx.xxx.xxx.entity(也就是javaBean类) |-xxx.xxx.xxx.xxx.service(业务逻辑接口) |-xxx.xxx.xxx.xxx.service.impl(业务逻辑实现类) |-xxx.xxx.xxx.xxx.controller resource-mapper . xxx . xxx.xml pom.xml版本信息: > mybatisplus.spring.boot.version-1.0.5 > mybatis-plus-2.3 > spring-boot-starter-parent-2.3 application.yml信息: mybatis-plus部分如下 > mapper-locations: classpath:mapper/**/*.xml > typeAliasesPackage: com.latou.power.modules.*.entity Java版本-1.8.0 Tomcat版本-8.5 Tomcat报错如下: > ConfigServletWebServerApplicationContext : > Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'custUserController': Unsatisfied dependency expressed through field 'custUserService'; > > nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'custUserService': Unsatisfied dependency expressed through field 'baseMapper'; > > nested exception is org.springframework.beans.factory.NoSuchBeanDefinition Exception: No qualifying bean of type 'com.latou.power.modules.cus.dao.CustUserDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

SpringBoot_Jpa+Thymeleaf运行部署问题,求帮忙!!!急

用SpringBoot_Jpa+Thymeleaf的项目,它源码在服务器上可以正常运行,我把源码放在本地上面就启动报错。这是什么问题?部署的问题吗?

spring boot项目打成war包并且部署访问时该网页无法正常运作

项目启动时不报错,就是无法访问 ![访问时出现此情况](https://img-ask.csdn.net/upload/201809/26/1537940972_649417.jpg) 访问的时候服务器也没有日志,我打的是war包,详情看代码 POM.XML ``` <dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>8.0.39</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <!-- 去除内嵌tomcat--> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> ``` ``` @EnableTransactionManagement @SpringBootApplication @MapperScan("com.vrqzd.dao") public class VrqzdApplication extends SpringBootServletInitializer implements CommandLineRunner { private final static Logger logger = LoggerFactory.getLogger(VrqzdApplication.class); public static void main(String[] args) { SpringApplication.run(VrqzdApplication.class, args); } @Override public void run(String... args) throws Exception { logger.info("主程序启动----------------->>启动完毕"); } } ``` ``` @EnableTransactionManagement @SpringBootApplication @MapperScan("com.vrqzd.dao") public class SpringBootStartApplication extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { // 注意这里要指向原先用main方法执行的Application启动类 return builder.sources(VrqzdApplication.class); } } ``` ``` /** * 登录页面载入 * @param response * @return */ @RequestMapping(value ="login",method = RequestMethod.GET) public String login(HttpServletResponse response, HttpSession session, HttpServletRequest request){ // return "page/login"; logger.info("==============登录发起=========="); Authentication auth = SecurityContextHolder.getContext().getAuthentication(); if (session.getAttribute("ret")!=null){ request.setAttribute("ret", session.getAttribute("ret")); session.removeAttribute("ret"); } if(auth instanceof AnonymousAuthenticationToken){ return "page/login"; }else{ return "redirect:/user"; } } ``` 发起这个登录的时候后台没有任何日志,就给我一个该网页无法正常运作,

weblogic10.3.6上面部署JAX-WS生成的webservice客户端的项目,出问题

刚毕业开始工作的编程菜鸟小姑娘一枚。 最近开发了一个小网站,需要调用大webservice服务发送验证码。项目基于myeclise+tomcat环境开发,在tomcat服务器上部署该项目能够正常运行,但是部署在weblogic10.3.6上就无法正常访问。 经过了两周的上百度查资料,看帖子。我的项目的webservice客户端是利用JAX-WS(2.1)的API,网上资料是说是 项目的 jar包和weblogic自带的jar包冲突出问题了。 我把项目先导出war包,然后在生成EAR包,修改了 application.xml 和 weblogic-appilication.xml文件之后,项目能够成功部署,但是实际访问的时候,webservice还是无法正常调用,报错信息里 还是存在jar包冲突。 经过多方询问,说是weblogic10.3.6自带的jdk是 jdk16_1.0_4,我开发项目用的是jdk1.6.0_45.现在想通过修改 weblogic自带的jdk版本来看能够成功部署该项目。 搞了两周没有把这个项目部署成功,好绝望的感觉。 第一次发帖子,描述得也有点乱,跪求各位大神高手,有处理过类似问题的,给出建议,小女子感激不尽!!

linux服务器部署SpringBoot服务的问题

![图片说明](https://img-ask.csdn.net/upload/201903/30/1553956328_115210.png) 部署好服务后 测试都正常,过上几个小时或者是几个小时 服务会自己暂停,然后用lsof -p pid 看服务打开文件显示好多这个,服务主要是接收请求的会接收nginx转发的一秒几十个请求,之前linux服务器打开文件限制是1024 过段时间会报错 too many open files 用ulimit -n 修改之后 不会报错,但服务还是会中止,代码中确认没有打开的流未关闭的问题,想问下各位还有什么原因可能导致这种问题。谢谢

2019 Python开发者日-培训

2019 Python开发者日-培训

150讲轻松搞定Python网络爬虫

150讲轻松搞定Python网络爬虫

设计模式(JAVA语言实现)--20种设计模式附带源码

设计模式(JAVA语言实现)--20种设计模式附带源码

YOLOv3目标检测实战:训练自己的数据集

YOLOv3目标检测实战:训练自己的数据集

java后台+微信小程序 实现完整的点餐系统

java后台+微信小程序 实现完整的点餐系统

三个项目玩转深度学习(附1G源码)

三个项目玩转深度学习(附1G源码)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

初级玩转Linux+Ubuntu(嵌入式开发基础课程)

2019 AI开发者大会

2019 AI开发者大会

玩转Linux:常用命令实例指南

玩转Linux:常用命令实例指南

一学即懂的计算机视觉(第一季)

一学即懂的计算机视觉(第一季)

4小时玩转微信小程序——基础入门与微信支付实战

4小时玩转微信小程序——基础入门与微信支付实战

Git 实用技巧

Git 实用技巧

Python数据清洗实战入门

Python数据清洗实战入门

使用TensorFlow+keras快速构建图像分类模型

使用TensorFlow+keras快速构建图像分类模型

实用主义学Python(小白也容易上手的Python实用案例)

实用主义学Python(小白也容易上手的Python实用案例)

程序员的算法通关课:知己知彼(第一季)

程序员的算法通关课:知己知彼(第一季)

MySQL数据库从入门到实战应用

MySQL数据库从入门到实战应用

机器学习初学者必会的案例精讲

机器学习初学者必会的案例精讲

手把手实现Java图书管理系统(附源码)

手把手实现Java图书管理系统(附源码)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

极简JAVA学习营第四期(报名以后加助教微信:eduxy-1)

.net core快速开发框架

.net core快速开发框架

玩转Python-Python3基础入门

玩转Python-Python3基础入门

Python数据挖掘简易入门

Python数据挖掘简易入门

微信公众平台开发入门

微信公众平台开发入门

程序员的兼职技能课

程序员的兼职技能课

Windows版YOLOv4目标检测实战:训练自己的数据集

Windows版YOLOv4目标检测实战:训练自己的数据集

HoloLens2开发入门教程

HoloLens2开发入门教程

微信小程序开发实战

微信小程序开发实战

Java8零基础入门视频教程

Java8零基础入门视频教程

相关热词 c#跨线程停止timer c#批量写入sql数据库 c# 自动安装浏览器 c#语言基础考试题 c# 偏移量打印是什么 c# 绘制曲线图 c#框体中的退出函数 c# 按钮透明背景 c# idl 混编出错 c#在位置0处没有任何行
立即提问