2019-08-02 15:41:06,443 ERROR [main] o.s.boot.SpringApplication [SpringApplication.java : 858] Application run failed java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.context.PropertyPlaceholderAutoConfiguration.propertySourcesPlaceholderConfigurer at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64) ... at cn.zjdt.Application.main(Application.java:9) Caused by: java.lang.IllegalStateException: Failed to introspect Class [cn.zjdt.common.config.CorsConfig] from ClassLoader [sun.misc.Launcher$AppClassLoader@14dad5dc] at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:686) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:583) at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:568) at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:626) at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:721) ... ... 16 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/Filter at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:760) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) at java.net.URLClassLoader.access$100(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:368) ... at java.lang.Class.getDeclaredMethods(Class.java:1975) at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:668) ... 38 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter 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) ... 78 common frames omitted
7.ERROR o.s.boot.SpringApplication - Application run failed
开发时在本地运行debug模式下运行好好的,但是部署到服务器上,就出现了下面的问题。
1 2
ERROR o.s.boot.SpringApplication - Application run failed org.springframework.jmx.export.UnableToRegisterMBeanException: Unable to register MBean [org.springframework.cloud.context.environment.EnvironmentManager@26bd5d2a] with key 'environmentManager'; nested exception is javax.management.InstanceAlreadyExistsException: org.springframework.cloud.context.environment:name=environmentManager,type=EnvironmentManager