Spring name space for beans and context

本文详细介绍了Spring框架中ApplicationContext配置的相关内容,特别是那些通常用于处理底层基础设施工作的Bean配置,如BeanFactoryPostProcessors等。

A.2.8. The context schema

The context tags deal with ApplicationContext configuration that relates to plumbing - that is, not usually beans that are important to an end-user but rather beans that do a lot of grunt work in Spring, such as BeanfactoryPostProcessors. The following snippet references the correct schema so that the tags in the context namespace are available to you.

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	   xmlns:context="http://www.springframework.org/schema/context"
	   xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">

<!-- <bean/> definitions here -->

</beans>
08:47:58.265 [restartedMain] ERROR o.s.b.w.e.t.TomcatStarter - [onStartup,61] - Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'jwtAuthenticationTokenFilter': Unsatisfied dependency expressed through field 'userLoginService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userLoginService': Unsatisfied dependency expressed through field 'permissionService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysPermissionService': Unsatisfied dependency expressed through field 'menuService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysMenuServiceImpl': Unsatisfied dependency expressed through field 'menuMapper'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sysMenuMapper' defined in file [/Users/karl/dev/idea_space/jincheng/yclearn/edu-system/target/classes/com/edu/system/mapper/SysMenuMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/edu/framework/config/MyBatisConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [/Users/karl/dev/idea_space/jincheng/yclearn/edu-system/target/classes/mapper/report/StuReportMapper.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error p
03-28
C:\Users\涂大钧\.jdks\corretto-17.0.14\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\lib\idea_rt.jar=58524:C:\Program Files\JetBrains\IntelliJ IDEA 2024.1.4\bin" -Dfile.encoding=UTF-8 -classpath D:\AAAAA\笔记\reids7\target\classes;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-jdbc\3.5.3\spring-boot-starter-jdbc-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter\3.5.3\spring-boot-starter-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot\3.5.3\spring-boot-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-autoconfigure\3.5.3\spring-boot-autoconfigure-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-logging\3.5.3\spring-boot-starter-logging-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\ch\qos\logback\logback-classic\1.5.18\logback-classic-1.5.18.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\ch\qos\logback\logback-core\1.5.18\logback-core-1.5.18.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\logging\log4j\log4j-to-slf4j\2.24.3\log4j-to-slf4j-2.24.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\logging\log4j\log4j-api\2.24.3\log4j-api-2.24.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\slf4j\jul-to-slf4j\2.0.17\jul-to-slf4j-2.0.17.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\annotation\jakarta.annotation-api\2.1.1\jakarta.annotation-api-2.1.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\yaml\snakeyaml\2.4\snakeyaml-2.4.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\zaxxer\HikariCP\6.3.0\HikariCP-6.3.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-jdbc\6.2.8\spring-jdbc-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-beans\6.2.8\spring-beans-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-tx\6.2.8\spring-tx-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\lettuce\lettuce-core\6.2.1.RELEASE\lettuce-core-6.2.1.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-common\4.1.122.Final\netty-common-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-handler\4.1.122.Final\netty-handler-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-resolver\4.1.122.Final\netty-resolver-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-buffer\4.1.122.Final\netty-buffer-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-transport-native-unix-common\4.1.122.Final\netty-transport-native-unix-common-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-codec\4.1.122.Final\netty-codec-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\netty\netty-transport\4.1.122.Final\netty-transport-4.1.122.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\projectreactor\reactor-core\3.7.7\reactor-core-3.7.7.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\reactivestreams\reactive-streams\1.0.4\reactive-streams-1.0.4.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-data-redis\3.5.3\spring-boot-starter-data-redis-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-redis\3.5.1\spring-data-redis-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-keyvalue\3.5.1\spring-data-keyvalue-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\data\spring-data-commons\3.5.1\spring-data-commons-3.5.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-oxm\6.2.8\spring-oxm-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-aop\6.2.8\spring-aop-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-context-support\6.2.8\spring-context-support-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\commons\commons-pool2\2.12.1\commons-pool2-2.12.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger2\2.9.2\springfox-swagger2-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-annotations\2.19.1\jackson-annotations-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-spi\2.9.2\springfox-spi-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-core\2.9.2\springfox-core-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-schema\2.9.2\springfox-schema-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger-common\2.9.2\springfox-swagger-common-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-spring-web\2.9.2\springfox-spring-web-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\guava\guava\20.0\guava-20.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\classmate\1.7.0\classmate-1.7.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\slf4j\slf4j-api\2.0.17\slf4j-api-2.0.17.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\plugin\spring-plugin-core\1.2.0.RELEASE\spring-plugin-core-1.2.0.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-context\6.2.8\spring-context-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\plugin\spring-plugin-metadata\1.2.0.RELEASE\spring-plugin-metadata-1.2.0.RELEASE.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\mapstruct\mapstruct\1.2.0.Final\mapstruct-1.2.0.Final.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\springfox\springfox-swagger-ui\2.9.2\springfox-swagger-ui-2.9.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\redis\clients\jedis\4.3.1\jedis-4.3.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\json\json\20220320\json-20220320.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\code\gson\gson\2.13.1\gson-2.13.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\google\errorprone\error_prone_annotations\2.38.0\error_prone_annotations-2.38.0.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-web\3.5.3\spring-boot-starter-web-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-json\3.5.3\spring-boot-starter-json-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-databind\2.19.1\jackson-databind-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\core\jackson-core\2.19.1\jackson-core-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.19.1\jackson-datatype-jdk8-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.19.1\jackson-datatype-jsr310-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.19.1\jackson-module-parameter-names-2.19.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\boot\spring-boot-starter-tomcat\3.5.3\spring-boot-starter-tomcat-3.5.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-core\10.1.42\tomcat-embed-core-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-el\10.1.42\tomcat-embed-el-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\apache\tomcat\embed\tomcat-embed-websocket\10.1.42\tomcat-embed-websocket-10.1.42.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-web\6.2.8\spring-web-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\micrometer\micrometer-observation\1.15.1\micrometer-observation-1.15.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\io\micrometer\micrometer-commons\1.15.1\micrometer-commons-1.15.1.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-webmvc\6.2.8\spring-webmvc-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-expression\6.2.8\spring-expression-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\projectlombok\lombok\1.18.38\lombok-1.18.38.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\xml\bind\jakarta.xml.bind-api\4.0.2\jakarta.xml.bind-api-4.0.2.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\jakarta\activation\jakarta.activation-api\2.1.3\jakarta.activation-api-2.1.3.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\net\bytebuddy\byte-buddy\1.17.6\byte-buddy-1.17.6.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-core\6.2.8\spring-core-6.2.8.jar;D:\develop\MAVEN\apache-maven-3.9.10\repository\org\springframework\spring-jcl\6.2.8\spring-jcl-6.2.8.jar com.sky.reids7.Reids7Application . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.5.3) 2025-07-16 15:03:52.444 [main] INFO com.sky.reids7.Reids7Application- Starting Reids7Application using Java 17.0.14 with PID 22976 (D:\AAAAA\笔记\reids7\target\classes started by 涂大钧 in D:\AAAAA\笔记\reids7) 2025-07-16 15:03:52.446 [main] INFO com.sky.reids7.Reids7Application- No active profile set, falling back to 1 default profile: "default" 2025-07-16 15:03:53.005 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Multiple Spring Data modules found, entering strict repository configuration mode 2025-07-16 15:03:53.007 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Bootstrapping Spring Data Redis repositories in DEFAULT mode. 2025-07-16 15:03:53.028 [main] INFO org.springframework.data.repository.config.RepositoryConfigurationDelegate- Finished Spring Data repository scanning in 9 ms. Found 0 Redis repository interfaces. 2025-07-16 15:03:53.448 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer- Tomcat initialized with port 8080 (http) 2025-07-16 15:03:53.461 [main] INFO org.apache.catalina.core.StandardService- Starting service [Tomcat] 2025-07-16 15:03:53.462 [main] INFO org.apache.catalina.core.StandardEngine- Starting Servlet engine: [Apache Tomcat/10.1.42] 2025-07-16 15:03:53.517 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]- Initializing Spring embedded WebApplicationContext 2025-07-16 15:03:53.517 [main] INFO org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext- Root WebApplicationContext: initialization completed in 1036 ms 2025-07-16 15:03:53.703 [main] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext- Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderController': Injection of resource dependencies failed 2025-07-16 15:03:53.708 [main] INFO org.apache.catalina.core.StandardService- Stopping service [Tomcat] 2025-07-16 15:03:53.716 [main] INFO org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLogger- Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-07-16 15:03:53.727 [main] ERROR org.springframework.boot.SpringApplication- Application run failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderController': Injection of resource dependencies failed at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1459) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1222) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1188) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1123) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) at com.sky.reids7.Reids7Application.main(Reids7Application.java:10) Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderService': Injection of resource dependencies failed at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:372) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1459) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:606) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:468) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:606) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:577) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:739) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:272) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:369) ... 19 common frames omitted Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'redisTemplate' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]: Unsatisfied dependency expressed through method 'redisTemplate' parameter 0: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: HEXPIRE at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:804) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:546) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1375) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1205) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:569) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeanByName(AbstractAutowireCapableBeanFactory.java:468) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:606) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:577) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:739) at org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:272) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:146) at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessProperties(CommonAnnotationBeanPostProcessor.java:369) ... 33 common frames omitted Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/data/redis/LettuceConnectionConfiguration.class]: HEXPIRE at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1826) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1683) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1628) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:913) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ... 49 common frames omitted Caused by: java.lang.NoSuchFieldError: HEXPIRE at org.springframework.data.redis.connection.lettuce.LettuceConnection$TypeHints.<clinit>(LettuceConnection.java:1163) at org.springframework.data.redis.connection.lettuce.LettuceConnection.<clinit>(LettuceConnection.java:112) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.start(LettuceConnectionFactory.java:938) at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.afterPropertiesSet(LettuceConnectionFactory.java:1009) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1873) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1822) ... 59 common frames omitted 进程已结束,退出代码为 1
07-17
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2025-06-26T19:46:23.303+08:00 ERROR 15456 --- [batistest] [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'userMapper' defined in file [D:\zuomian_cannotdelete\batistest\target\classes\com\ch\batistest\mapper\UserMapper.class]: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:864) ~[spring-beans-6.2.8.jar:6.2.8] at org.springframework.beans.factory.support.AbstractBeanFactory.getType(AbstractBeanFactory.java:745) ~[spring-beans-6.2.8.jar:6.2.8] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAnnotationOnBean(DefaultListableBeanFactory.java:817) ~[spring-beans-6.2.8.jar:6.2.8] at org.springframework.boot.sql.init.dependency.AnnotationDependsOnDatabaseInitializationDetector.detect(AnnotationDependsOnDatabaseInitializationDetector.java:36) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer$DependsOnDatabaseInitializationPostProcessor.detectDependsOnInitializationBeanNames(DatabaseInitializationDependencyConfigurer.java:152) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.sql.init.dependency.DatabaseInitializationDependencyConfigurer$DependsOnDatabaseInitializationPostProcessor.postProcessBeanFactory(DatabaseInitializationDependencyConfigurer.java:115) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:363) ~[spring-context-6.2.8.jar:6.2.8] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:197) ~[spring-context-6.2.8.jar:6.2.8] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:791) ~[spring-context-6.2.8.jar:6.2.8] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:609) ~[spring-context-6.2.8.jar:6.2.8] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:318) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1361) ~[spring-boot-3.5.3.jar:3.5.3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1350) ~[spring-boot-3.5.3.jar:3.5.3] at com.ch.batistest.BatistestApplication.main(BatistestApplication.java:12) ~[classes/:na]
06-27
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值