mlj1234 opened a new issue, #1346:
URL: https://github.com/apache/shiro/issues/1346

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/shiro/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Environment
   
   jdk21
   
   ### Shiro version
   
   2.0.0
   
   ### What was the actual outcome?
   
   Application run failed
   
   ### What was the expected outcome?
   
   Application run success
   
   ### How to reproduce
   
   1、start.spring.io create project 
   Project:Maven
   Language:Java
   Spring Boot:3.2.3
   Packaging:War
   Java:21
   
   Dependencies: Spring Web
   
   2、pom.xml add
   <dependency>
     <groupId>org.apache.shiro</groupId>
     <artifactId>shiro-spring-boot-web-starter</artifactId>
     <version>2.0.0</version>
   </dependency>
   
   3、in Spring Tool Suite 4 run application
   
   ### Debug logs
   
   
     .   ____          _            __ _ _
    /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
   ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
    \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
     '  |____| .__|_| |_|_| |_\__, | / / / /
    =========|_|==============|___/=/_/_/_/
    :: Spring Boot ::                (v3.2.3)
   
   2024-03-11T14:49:15.472+08:00  INFO 15024 
--- [           main] 
com.example.demo.DemoApplication         : 
Starting DemoApplication using Java 21.0.1 with PID 15024 
(C:\Users\mlj\Desktop\123\demo\target\classes started by mlj in 
C:\Users\mlj\Desktop\123\demo)
   2024-03-11T14:49:15.474+08:00  INFO 15024 
--- [           main] 
com.example.demo.DemoApplication         : No 
active profile set, falling back to 1 default profile: "default"
   2024-03-11T14:49:15.924+08:00  WARN 15024 
--- [           main] 
ConfigServletWebServerApplicationContext : 
Exception encountered during context initialization - cancelling refresh 
attempt: java.lang.IllegalStateException: Error processing condition on 
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration.globalFilters
   2024-03-11T14:49:15.932+08:00  INFO 15024 
--- [           main] 
.s.b.a.l.ConditionEvaluationReportLogger : 
   
   Error starting ApplicationContext. To display the condition evaluation 
report re-run your application with 'debug' enabled.
   2024-03-11T14:49:15.959+08:00 ERROR 15024 
--- [           main] 
o.s.boot.SpringApplication               : 
Application run failed
   
   java.lang.IllegalStateException: Error processing condition on 
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration.globalFilters
        at 
org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:60)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:183)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:144)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:120)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:428)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:289)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:349)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:118)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:788)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:606)
 ~[spring-context-6.1.4.jar:6.1.4]
        at 
org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
 ~[spring-boot-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) 
~[spring-boot-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
 ~[spring-boot-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:334) 
~[spring-boot-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) 
~[spring-boot-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) 
~[spring-boot-3.2.3.jar:3.2.3]
        at com.example.demo.DemoApplication.main(DemoApplication.java:13) 
~[classes/:na]
   Caused by: java.lang.IllegalStateException: Failed to introspect Class 
[org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration] 
from ClassLoader [jdk.internal.loader.ClassLoaders$AppClassLoader@36baf30c]
        at 
org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:483)
 ~[spring-core-6.1.4.jar:6.1.4]
        at 
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:360)
 ~[spring-core-6.1.4.jar:6.1.4]
        at 
org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:417)
 ~[spring-core-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$1(AbstractAutowireCapableBeanFactory.java:750)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
 ~[na:na]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:749)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:682)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:653)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1644)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:562)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:534)
 ~[spring-beans-6.1.4.jar:6.1.4]
        at 
org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:247)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:240)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:230)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:183)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:158)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        at 
org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47)
 ~[spring-boot-autoconfigure-3.2.3.jar:3.2.3]
        ... 17 common frames omitted
   Caused by: java.lang.NoClassDefFoundError: javax/servlet/Filter
        at java.base/java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
        at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3578) 
~[na:na]
        at java.base/java.lang.Class.getDeclaredMethods(Class.java:2676) 
~[na:na]
        at 
org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:465)
 ~[spring-core-6.1.4.jar:6.1.4]
        ... 33 common frames omitted
   Caused by: java.lang.ClassNotFoundException: javax.servlet.Filter
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
 ~[na:na]
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
 ~[na:na]
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) 
~[na:na]
        ... 37 common frames omitted
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@shiro.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@shiro.apache.org
For additional commands, e-mail: issues-h...@shiro.apache.org

Reply via email to