国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Consider defining a bean of type ‘com.example.springbootdemo.mapper.UserMapper‘ in your configuratio

這篇具有很好參考價(jià)值的文章主要介紹了Consider defining a bean of type ‘com.example.springbootdemo.mapper.UserMapper‘ in your configuratio。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問(wèn)。

"C:\Program Files\Java\jdk1.8.0_181\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:49658,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -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:\Users\Lucas\AppData\Local\JetBrains\IntelliJIdea2022.3\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_181\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_181\jre\lib\rt.jar;C:\tfy\code\springbootDemo\springbootDemo\target\classes;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-data-jdbc\2.6.11\spring-boot-starter-data-jdbc-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\data\spring-data-jdbc\2.3.6\spring-data-jdbc-2.3.6.jar;C:\Users\Lucas\.m2\repository\org\springframework\data\spring-data-relational\2.3.6\spring-data-relational-2.3.6.jar;C:\Users\Lucas\.m2\repository\org\springframework\data\spring-data-commons\2.6.6\spring-data-commons-2.6.6.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-tx\5.3.22\spring-tx-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-context\5.3.22\spring-context-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-beans\5.3.22\spring-beans-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.6.11\spring-boot-starter-data-jpa-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-aop\2.6.11\spring-boot-starter-aop-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-aop\5.3.22\spring-aop-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\aspectj\aspectjweaver\1.9.7\aspectjweaver-1.9.7.jar;C:\Users\Lucas\.m2\repository\jakarta\transaction\jakarta.transaction-api\1.3.3\jakarta.transaction-api-1.3.3.jar;C:\Users\Lucas\.m2\repository\jakarta\persistence\jakarta.persistence-api\2.2.3\jakarta.persistence-api-2.2.3.jar;C:\Users\Lucas\.m2\repository\org\hibernate\hibernate-core\5.6.10.Final\hibernate-core-5.6.10.Final.jar;C:\Users\Lucas\.m2\repository\org\jboss\logging\jboss-logging\3.4.3.Final\jboss-logging-3.4.3.Final.jar;C:\Users\Lucas\.m2\repository\net\bytebuddy\byte-buddy\1.11.22\byte-buddy-1.11.22.jar;C:\Users\Lucas\.m2\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;C:\Users\Lucas\.m2\repository\org\jboss\jandex\2.4.2.Final\jandex-2.4.2.Final.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;C:\Users\Lucas\.m2\repository\org\hibernate\common\hibernate-commons-annotations\5.1.2.Final\hibernate-commons-annotations-5.1.2.Final.jar;C:\Users\Lucas\.m2\repository\org\glassfish\jaxb\jaxb-runtime\2.3.6\jaxb-runtime-2.3.6.jar;C:\Users\Lucas\.m2\repository\org\glassfish\jaxb\txw2\2.3.6\txw2-2.3.6.jar;C:\Users\Lucas\.m2\repository\com\sun\istack\istack-commons-runtime\3.0.12\istack-commons-runtime-3.0.12.jar;C:\Users\Lucas\.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\Lucas\.m2\repository\org\springframework\data\spring-data-jpa\2.6.6\spring-data-jpa-2.6.6.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-orm\5.3.22\spring-orm-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-aspects\5.3.22\spring-aspects-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-jdbc\2.6.11\spring-boot-starter-jdbc-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter\2.6.11\spring-boot-starter-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot\2.6.11\spring-boot-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.6.11\spring-boot-autoconfigure-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.6.11\spring-boot-starter-logging-2.6.11.jar;C:\Users\Lucas\.m2\repository\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;C:\Users\Lucas\.m2\repository\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;C:\Users\Lucas\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;C:\Users\Lucas\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;C:\Users\Lucas\.m2\repository\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;C:\Users\Lucas\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\Lucas\.m2\repository\org\yaml\snakeyaml\1.29\snakeyaml-1.29.jar;C:\Users\Lucas\.m2\repository\com\zaxxer\HikariCP\4.0.3\HikariCP-4.0.3.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-jdbc\5.3.22\spring-jdbc-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-thymeleaf\2.6.11\spring-boot-starter-thymeleaf-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\thymeleaf\thymeleaf-spring5\3.0.15.RELEASE\thymeleaf-spring5-3.0.15.RELEASE.jar;C:\Users\Lucas\.m2\repository\org\thymeleaf\thymeleaf\3.0.15.RELEASE\thymeleaf-3.0.15.RELEASE.jar;C:\Users\Lucas\.m2\repository\org\attoparser\attoparser\2.0.5.RELEASE\attoparser-2.0.5.RELEASE.jar;C:\Users\Lucas\.m2\repository\org\unbescape\unbescape\1.1.6.RELEASE\unbescape-1.1.6.RELEASE.jar;C:\Users\Lucas\.m2\repository\org\thymeleaf\extras\thymeleaf-extras-java8time\3.0.4.RELEASE\thymeleaf-extras-java8time-3.0.4.RELEASE.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.6.11\spring-boot-starter-web-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.6.11\spring-boot-starter-json-2.6.11.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;C:\Users\Lucas\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;C:\Users\Lucas\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.6.11\spring-boot-starter-tomcat-2.6.11.jar;C:\Users\Lucas\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.65\tomcat-embed-core-9.0.65.jar;C:\Users\Lucas\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.65\tomcat-embed-el-9.0.65.jar;C:\Users\Lucas\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.65\tomcat-embed-websocket-9.0.65.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-web\5.3.22\spring-web-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-webmvc\5.3.22\spring-webmvc-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-expression\5.3.22\spring-expression-5.3.22.jar;C:\Users\Lucas\.m2\repository\mysql\mysql-connector-java\8.0.13\mysql-connector-java-8.0.13.jar;C:\Users\Lucas\.m2\repository\org\mybatis\mybatis\3.2.6\mybatis-3.2.6.jar;C:\Users\Lucas\.m2\repository\org\mybatis\mybatis-spring\1.2.2\mybatis-spring-1.2.2.jar;C:\Users\Lucas\.m2\repository\org\postgresql\postgresql\42.3.6\postgresql-42.3.6.jar;C:\Users\Lucas\.m2\repository\org\checkerframework\checker-qual\3.5.0\checker-qual-3.5.0.jar;C:\Users\Lucas\.m2\repository\jakarta\xml\bind\jakarta.xml.bind-api\2.3.3\jakarta.xml.bind-api-2.3.3.jar;C:\Users\Lucas\.m2\repository\jakarta\activation\jakarta.activation-api\1.2.2\jakarta.activation-api-1.2.2.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-core\5.3.22\spring-core-5.3.22.jar;C:\Users\Lucas\.m2\repository\org\springframework\spring-jcl\5.3.22\spring-jcl-5.3.22.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.1\lib\idea_rt.jar" com.example.springbootdemo.SpringbootDemoApplication
Connected to the target VM, address: '127.0.0.1:49658', transport: 'socket'

? . ? ____ ? ? ? ? ?_ ? ? ? ? ? ?__ _ _
?/\\ / ___'_ __ _ _(_)_ __ ?__ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
?\\/ ?___)| |_)| | | | | || (_| | ?) ) ) )
? ' ?|____| .__|_| |_|_| |_\__, | / / / /
?=========|_|==============|___/=/_/_/_/
?:: Spring Boot :: ? ? ? ? ? ? ? (v2.6.11)

2023-01-11 09:50:12.735 ?INFO 91244 --- [ ? ? ? ? ? main] c.e.s.SpringbootDemoApplication ? ? ? ? ?: Starting SpringbootDemoApplication using Java 1.8.0_181 on DESKTOP-JSP3CM3 with PID 91244 (C:\tfy\code\springbootDemo\springbootDemo\target\classes started by Lucas in C:\tfy\code\springbootDemo\springbootDemo)
2023-01-11 09:50:12.738 ?INFO 91244 --- [ ? ? ? ? ? main] c.e.s.SpringbootDemoApplication ? ? ? ? ?: No active profile set, falling back to 1 default profile: "default"
2023-01-11 09:50:13.260 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2023-01-11 09:50:13.260 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JDBC repositories in DEFAULT mode.
2023-01-11 09:50:13.270 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 JDBC repository interfaces.
2023-01-11 09:50:13.276 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode
2023-01-11 09:50:13.277 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.
2023-01-11 09:50:13.284 ?INFO 91244 --- [ ? ? ? ? ? main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 2 ms. Found 0 JPA repository interfaces.
2023-01-11 09:50:13.703 ?INFO 91244 --- [ ? ? ? ? ? main] o.s.b.w.embedded.tomcat.TomcatWebServer ?: Tomcat initialized with port(s): 8080 (http)
2023-01-11 09:50:13.714 ?INFO 91244 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Starting service [Tomcat]
2023-01-11 09:50:13.714 ?INFO 91244 --- [ ? ? ? ? ? main] org.apache.catalina.core.StandardEngine ?: Starting Servlet engine: [Apache Tomcat/9.0.65]
2023-01-11 09:50:13.837 ?INFO 91244 --- [ ? ? ? ? ? main] o.a.c.c.C.[Tomcat].[localhost].[/] ? ? ? : Initializing Spring embedded WebApplicationContext
2023-01-11 09:50:13.837 ?INFO 91244 --- [ ? ? ? ? ? main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1063 ms
2023-01-11 09:50:13.956 ?INFO 91244 --- [ ? ? ? ? ? main] com.zaxxer.hikari.HikariDataSource ? ? ? : defaultDataSource - Starting...
2023-01-11 09:50:14.199 ?INFO 91244 --- [ ? ? ? ? ? main] com.zaxxer.hikari.HikariDataSource ? ? ? : defaultDataSource - Start completed.
2023-01-11 09:50:14.281 ?INFO 91244 --- [ ? ? ? ? ? main] o.hibernate.jpa.internal.util.LogHelper ?: HHH000204: Processing PersistenceUnitInfo [name: default]
2023-01-11 09:50:14.323 ?INFO 91244 --- [ ? ? ? ? ? main] org.hibernate.Version ? ? ? ? ? ? ? ? ? ?: HHH000412: Hibernate ORM core version 5.6.10.Final
2023-01-11 09:50:14.458 ?INFO 91244 --- [ ? ? ? ? ? main] o.hibernate.annotations.common.Version ? : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
2023-01-11 09:50:14.545 ?INFO 91244 --- [ ? ? ? ? ? main] org.hibernate.dialect.Dialect ? ? ? ? ? ?: HHH000400: Using dialect: org.hibernate.dialect.MySQL8Dialect
2023-01-11 09:50:14.658 ?INFO 91244 --- [ ? ? ? ? ? main] o.h.e.t.j.p.i.JtaPlatformInitiator ? ? ? : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2023-01-11 09:50:14.666 ?INFO 91244 --- [ ? ? ? ? ? main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2023-01-11 09:50:14.680 ?WARN 91244 --- [ ? ? ? ? ? main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userController': Unsatisfied dependency expressed through field 'userService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userServiceImpl': Unsatisfied dependency expressed through field 'userMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.springbootdemo.mapper.UserMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2023-01-11 09:50:14.681 ?INFO 91244 --- [ ? ? ? ? ? main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2023-01-11 09:50:14.684 ?INFO 91244 --- [ ? ? ? ? ? main] com.zaxxer.hikari.HikariDataSource ? ? ? : defaultDataSource - Shutdown initiated...
2023-01-11 09:50:14.687 ?INFO 91244 --- [ ? ? ? ? ? main] com.zaxxer.hikari.HikariDataSource ? ? ? : defaultDataSource - Shutdown completed.
2023-01-11 09:50:14.689 ?INFO 91244 --- [ ? ? ? ? ? main] o.apache.catalina.core.StandardService ? : Stopping service [Tomcat]
2023-01-11 09:50:14.699 ?INFO 91244 --- [ ? ? ? ? ? main] ConditionEvaluationReportLoggingListener :?

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-01-11 09:50:14.722 ERROR 91244 --- [ ? ? ? ? ? main] o.s.b.d.LoggingFailureAnalysisReporter ? :?

***************************
APPLICATION FAILED TO START
***************************

Description:

Field userMapper in com.example.springbootdemo.service.impl.UserServiceImpl required a bean of type 'com.example.springbootdemo.mapper.UserMapper' that could not be found.

The injection point has the following annotations:
?? ?- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.example.springbootdemo.mapper.UserMapper' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:49658', transport: 'socket'

Process finished with exit code 1
?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-753614.html

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.example.springbootdemo.mapper.UserMapper" >
    <select id="selectUserById" parameterType="int" resultType="com.example.springbootdemo.model.User">
        select * from yyb where id='03'
    </select>
</mapper>

到了這里,關(guān)于Consider defining a bean of type ‘com.example.springbootdemo.mapper.UserMapper‘ in your configuratio的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來(lái)自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • IDEA提示找不到Mapper接口:Could not autowire.No beans of ‘xxxMapper‘ type found

    IDEA提示找不到Mapper接口:Could not autowire.No beans of ‘xxxMapper‘ type found

    我們可以看到,上面的紅色警告在提示我們,找不到 xxxMaper 這個(gè)類型的 bean。 為啥呢? 因?yàn)?@Mapper 這個(gè)注解是 Mybatis 提供的,而 @Autowried 注解是 Spring 提供的,IDEA能理解 Spring 的上下文,但是卻和 Mybatis 關(guān)聯(lián)不上。而且我們可以根據(jù) @Autowried 源碼看到,默認(rèn)情況下,@Autowri

    2024年02月08日
    瀏覽(24)
  • A component required a bean of type ‘...Mapper‘ that could not be found問(wèn)題解決

    A component required a bean of type ‘...Mapper‘ that could not be found問(wèn)題解決

    錯(cuò)誤如圖 第一步 查看配置文件是否正確 第二步 查看標(biāo)簽是否正確 檢查UserMapper上是否加上@Mapper 補(bǔ)充 第二步還是不行的話查看下POM文件是否導(dǎo)入mybatis-plus-boot-starter 配置mybatis-plus.mapper-locations無(wú)提示信息; 此時(shí)發(fā)現(xiàn)右上角出現(xiàn)感嘆號(hào),Cannot resolve configuration property ‘mybatis-

    2024年02月16日
    瀏覽(19)
  • Springboot啟動(dòng)出現(xiàn)A component required a bean of type ‘com.xxx‘ that could not問(wèn)題解決

    Springboot啟動(dòng)出現(xiàn)A component required a bean of type ‘com.xxx‘ that could not問(wèn)題解決

    今日寫一個(gè)websocket小demo,啟動(dòng)項(xiàng)目時(shí)出現(xiàn)錯(cuò)誤如下圖 檢查也沒(méi)發(fā)現(xiàn)漏寫注解,思考片刻后突然想起springboot掃描的范圍是與啟動(dòng)類同級(jí)別的包-就是com.huang.demo.ssm目錄下所有注解bean都被掃描,那么ws包里面的bean不在ssm這個(gè)路徑下,所以導(dǎo)致springboot啟動(dòng)時(shí)掃描不到。最后把ws包

    2024年02月11日
    瀏覽(23)
  • 【Spring常見錯(cuò)誤】No qualifying bean of type

    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name \\\'com.ssmpdemo.ServiceTest\\\': Unsatisfied dependency expressed through field \\\'userService\\\'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type \\\'com.ssmpdemo.service.UserService\\\' available: expected at leas

    2023年04月08日
    瀏覽(22)
  • springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type ‘x‘ available

    springframework.beans.factory.NoSuchBeanDefinitionException:No qualifying bean of type ‘x‘ available

    今天在執(zhí)行 quartz 定時(shí)任務(wù)時(shí),報(bào)出如下錯(cuò)誤: 發(fā)現(xiàn)這個(gè)錯(cuò)誤: No qualifying bean of type \\\'com.xxx.CollectionTaskServiceImpl\\\' available 。 我們繼續(xù)看錯(cuò)誤,錯(cuò)誤發(fā)生在 SpringApplicationContext.getBean 的方法中。 結(jié)合 No qualifying bean of type \\\'com.xxx.CollectionTaskServiceImpl\\\' available 錯(cuò)誤可知, SpringApplica

    2024年02月04日
    瀏覽(18)
  • Could not autowire. No beans of ‘DiscoveryClient‘ type found.

    Could not autowire. No beans of ‘DiscoveryClient‘ type found.

    一、導(dǎo)錯(cuò)了包 DiscoveryClient對(duì)應(yīng)有兩個(gè)包: org.springframework.cloud.client.discovery.DiscoveryClient; com.netflix.discovery.DiscoveryClient; 目前導(dǎo)入的包是: 改成第一個(gè)包,發(fā)現(xiàn)不再報(bào)紅了。

    2024年02月11日
    瀏覽(30)
  • 解決Mapper method ‘com.xxx‘ attempted to return null from a method with a primitive return type (xxx)

    今天寫完 頁(yè)面按鈕排序 接口,如下代碼所示:

    2024年02月05日
    瀏覽(56)
  • @Autowired報(bào)錯(cuò)Could not autowire. No beans of ‘XXX‘ type found

    @Autowired報(bào)錯(cuò)Could not autowire. No beans of ‘XXX‘ type found

    ??IDEA中使用 @Autowired 報(bào)錯(cuò) Could not autowire. No beans of \\\'XXX\\\' type found ,錯(cuò)誤大致意思為:沒(méi)有匹配到類型為XXX的bean。 ??個(gè)人覺得,注入 controller 的 service 雖然一般來(lái)說(shuō)我們都是注入一個(gè)接口,但是該接口有實(shí)現(xiàn)類,并且使用 @Service 進(jìn)行關(guān)聯(lián),所以注入類型應(yīng)該也可以視為一

    2024年02月07日
    瀏覽(26)
  • idea報(bào)錯(cuò):Could not autowire. No beans of ‘UserService‘ type found.

    點(diǎn)個(gè)關(guān)注,必回關(guān) 翻譯:無(wú)法自動(dòng)連線。未找到“用戶服務(wù)”類型的服務(wù)類。 當(dāng)報(bào)錯(cuò)之后idea會(huì)提示錯(cuò)誤,不過(guò)程序的編譯和運(yùn)行都是沒(méi)有問(wèn)題的(這個(gè)錯(cuò)誤提示不會(huì)產(chǎn)生任何印象) 解決方案 解決方案1: Settings - Editor - Inspections - Spring - Spring Core - Code - Autowiring for Bean Class

    2024年02月11日
    瀏覽(24)
  • No qualifying bean of type ‘org.springframework.transaction.TransactionManager‘ available: expected

    報(bào)錯(cuò)信息 Spring Boot 啟動(dòng)報(bào)錯(cuò): 報(bào)錯(cuò)信息顯示:沒(méi)有可注入的 TransactionManager ,因?yàn)橐蟠耸挛锕芾砥鲬?yīng)該是一個(gè),但是發(fā)現(xiàn)了兩個(gè),容器不知道應(yīng)該注入哪個(gè),存在的兩個(gè)容器分別是: transactionManager 、 mongoTransactionManager 解決辦法 方法一:Primary 查找項(xiàng)目?jī)?nèi)bean名稱為: tra

    2024年02月03日
    瀏覽(16)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包