java - Spring boot dependency injection error -
i'm new spring , tried performing simple crud operation using spring boot i'm having issues dependency injection
here's code:
package com.teamapt.alm.model; import javax.persistence.*; import java.io.serializable; /** * created abayomi on 03/12/2015. */ @entity @table(name = "report") public class report implements serializable { private static final long serialversionuid = 1l; @id @generatedvalue(strategy = generationtype.auto) @column(name = "id", nullable = false) private integer id; @column(name = "type", nullable = false) private string type; @column(name = "query", nullable = false) private string query; @column(name = "summary", nullable = true) private string summary; public integer getid() { return id; } public void setid(integer id) { this.id = id; } public string gettype() { return type; } public void settype(string type) { this.type = type; } public string getquery() { return query; } public void setquery(string query) { this.query = query; } public string getsummary() { return summary; } public void setsummary(string summary) { this.summary = summary; } }
the repository:
package com.teamapt.alm.repository; import com.teamapt.alm.model.report; import org.springframework.data.jpa.repository.jparepository; import org.springframework.stereotype.repository; import java.util.list; /** * created ayo on 22-feb-16. */ @repository public interface reportrepositorycustom extends jparepository<report, long> { //list<report> findbyid(long id); list<report> findbytype(string reporttype); }
the controller class:
package com.teamapt.alm.controller; import com.teamapt.alm.model.report; import com.teamapt.alm.repository.reportrepositorycustom; import com.teamapt.alm.service.crudservice; import org.springframework.beans.factory.annotation.autowired; import org.springframework.stereotype.controller; import org.springframework.web.bind.annotation.requestmapping; import org.springframework.web.bind.annotation.requestmethod; import org.springframework.web.bind.annotation.restcontroller; /** * created ayo on 22-feb-16. */ @controller @requestmapping(value = "/") public class reportscontroller { @autowired reportrepositorycustom repo; //crudservice crudservice; /*@requestmapping(value = "/{reporttype}", method = requestmethod.get) public string reporttypes(@pathvariable("reporttype") string reporttype, model model){ list<report> reportlist = crudservice.findbytype(reporttype); if(reportlist!=null) { model.addattribute("", reportlist); } return "reportlist"; }*/ @requestmapping(value = "/add", method = requestmethod.post) public string addreport(report report){ repo.save(report); return "success"; } }
the application class:
package com.teamapt.alm.config; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication; import org.springframework.boot.orm.jpa.entityscan; import org.springframework.context.annotation.componentscan; import org.springframework.data.jpa.repository.config.enablejparepositories; @springbootapplication @entityscan(basepackages = "com.teamapt.alm.model") @enablejparepositories(basepackages = "com.teamapt.alm.repository") @componentscan("com.teamapt.alm") public class analyticscrudapplication { public static void main(string[] args) { springapplication.run(analyticscrudapplication.class, args); } }
my error log:
2016-02-23 12:19:02.297 error 5644 --- [ main] o.s.boot.springapplication : application startup failed org.springframework.beans.factory.beancreationexception: error creating bean name 'reportscontroller': injection of autowired dependencies failed; nested exception org.springframework.beans.factory.beancreationexception: not autowire field: com.teamapt.alm.repository.reportrepositorycustom com.teamapt.alm.controller.reportscontroller.repo; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'reportrepositorycustom': invocation of init method failed; nested exception org.springframework.data.mapping.propertyreferenceexception: no property type found type report! @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:334) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.populatebean(abstractautowirecapablebeanfactory.java:1214) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:543) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:482) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:306) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:302) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:197) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:772) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:839) ~[spring-context-4.2.4.release.jar:4.2.4.release] @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:538) ~[spring-context-4.2.4.release.jar:4.2.4.release] @ org.springframework.boot.context.embedded.embeddedwebapplicationcontext.refresh(embeddedwebapplicationcontext.java:118) ~[spring-boot-1.3.2.release.jar:1.3.2.release] @ org.springframework.boot.springapplication.refresh(springapplication.java:766) [spring-boot-1.3.2.release.jar:1.3.2.release] @ org.springframework.boot.springapplication.createandrefreshcontext(springapplication.java:361) [spring-boot-1.3.2.release.jar:1.3.2.release] @ org.springframework.boot.springapplication.run(springapplication.java:307) [spring-boot-1.3.2.release.jar:1.3.2.release] @ org.springframework.boot.springapplication.run(springapplication.java:1191) [spring-boot-1.3.2.release.jar:1.3.2.release] @ org.springframework.boot.springapplication.run(springapplication.java:1180) [spring-boot-1.3.2.release.jar:1.3.2.release] @ com.teamapt.alm.config.analyticscrudapplication.main(analyticscrudapplication.java:15) [classes/:na] @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) ~[na:1.8.0_45] @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) ~[na:1.8.0_45] @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) ~[na:1.8.0_45] @ java.lang.reflect.method.invoke(method.java:497) ~[na:1.8.0_45] @ com.intellij.rt.execution.application.appmain.main(appmain.java:144) [idea_rt.jar:na] caused by: org.springframework.beans.factory.beancreationexception: not autowire field: com.teamapt.alm.repository.reportrepositorycustom com.teamapt.alm.controller.reportscontroller.repo; nested exception org.springframework.beans.factory.beancreationexception: error creating bean name 'reportrepositorycustom': invocation of init method failed; nested exception org.springframework.data.mapping.propertyreferenceexception: no property type found type report! @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:573) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.annotation.injectionmetadata.inject(injectionmetadata.java:88) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor.postprocesspropertyvalues(autowiredannotationbeanpostprocessor.java:331) ~[spring-beans-4.2.4.release.jar:4.2.4.release] ... 22 common frames omitted caused by: org.springframework.beans.factory.beancreationexception: error creating bean name 'reportrepositorycustom': invocation of init method failed; nested exception org.springframework.data.mapping.propertyreferenceexception: no property type found type report! @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1578) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:545) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:482) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:306) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:230) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:302) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:197) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultlistablebeanfactory.findautowirecandidates(defaultlistablebeanfactory.java:1192) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultlistablebeanfactory.doresolvedependency(defaultlistablebeanfactory.java:1116) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.defaultlistablebeanfactory.resolvedependency(defaultlistablebeanfactory.java:1014) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.annotation.autowiredannotationbeanpostprocessor$autowiredfieldelement.inject(autowiredannotationbeanpostprocessor.java:545) ~[spring-beans-4.2.4.release.jar:4.2.4.release] ... 24 common frames omitted caused by: org.springframework.data.mapping.propertyreferenceexception: no property type found type report! @ org.springframework.data.mapping.propertypath.<init>(propertypath.java:75) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.mapping.propertypath.create(propertypath.java:327) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.mapping.propertypath.create(propertypath.java:307) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.mapping.propertypath.from(propertypath.java:270) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.mapping.propertypath.from(propertypath.java:241) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.query.parser.part.<init>(part.java:76) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.query.parser.parttree$orpart.<init>(parttree.java:235) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.query.parser.parttree$predicate.buildtree(parttree.java:373) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.query.parser.parttree$predicate.<init>(parttree.java:353) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.query.parser.parttree.<init>(parttree.java:87) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.jpa.repository.query.parttreejpaquery.<init>(parttreejpaquery.java:61) ~[spring-data-jpa-1.9.2.release.jar:na] @ org.springframework.data.jpa.repository.query.jpaquerylookupstrategy$createquerylookupstrategy.resolvequery(jpaquerylookupstrategy.java:95) ~[spring-data-jpa-1.9.2.release.jar:na] @ org.springframework.data.jpa.repository.query.jpaquerylookupstrategy$createifnotfoundquerylookupstrategy.resolvequery(jpaquerylookupstrategy.java:206) ~[spring-data-jpa-1.9.2.release.jar:na] @ org.springframework.data.jpa.repository.query.jpaquerylookupstrategy$abstractquerylookupstrategy.resolvequery(jpaquerylookupstrategy.java:73) ~[spring-data-jpa-1.9.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.<init>(repositoryfactorysupport.java:416) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport.getrepository(repositoryfactorysupport.java:206) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorybeansupport.initandreturn(repositoryfactorybeansupport.java:251) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorybeansupport.afterpropertiesset(repositoryfactorybeansupport.java:237) ~[spring-data-commons-1.11.2.release.jar:na] @ org.springframework.data.jpa.repository.support.jparepositoryfactorybean.afterpropertiesset(jparepositoryfactorybean.java:92) ~[spring-data-jpa-1.9.2.release.jar:na] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1637) ~[spring-beans-4.2.4.release.jar:4.2.4.release] @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1574) ~[spring-beans-4.2.4.release.jar:4.2.4.release] ... 34 common frames omitted 2016-02-23 12:19:02.310 info 5644 --- [ main] .b.l.classpathloggingapplicationlistener : application failed start classpath: [file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/charsets.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/deploy.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/access-bridge-32.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/cldrdata.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/dnsns.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/jaccess.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/jfxrt.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/localedata.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/nashorn.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/sunec.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/sunjce_provider.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/sunmscapi.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/sunpkcs11.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/ext/zipfs.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/javaws.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/jce.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/jfr.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/jfxswt.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/jsse.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/management-agent.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/plugin.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/resources.jar, file:/c:/program%20files%20(x86)/java/jdk1.8.0_45/jre/lib/rt.jar, file:/c:/users/ayo/downloads/springia4_sourcecode/chapter_01/alm%20business%20analytics%20crud%20op/target/classes/, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-actuator/1.3.2.release/spring-boot-starter-actuator-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter/1.3.2.release/spring-boot-starter-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot/1.3.2.release/spring-boot-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.3.2.release/spring-boot-autoconfigure-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.3.2.release/spring-boot-starter-logging-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar, file:/c:/users/ayo/.m2/repository/ch/qos/logback/logback-core/1.1.3/logback-core-1.1.3.jar, file:/c:/users/ayo/.m2/repository/org/slf4j/jul-to-slf4j/1.7.13/jul-to-slf4j-1.7.13.jar, file:/c:/users/ayo/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.13/log4j-over-slf4j-1.7.13.jar, file:/c:/users/ayo/.m2/repository/org/yaml/snakeyaml/1.16/snakeyaml-1.16.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-actuator/1.3.2.release/spring-boot-actuator-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-context/4.2.4.release/spring-context-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-data-jpa/1.3.2.release/spring-boot-starter-data-jpa-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-aop/1.3.2.release/spring-boot-starter-aop-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-aop/4.2.4.release/spring-aop-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/c:/users/ayo/.m2/repository/org/aspectj/aspectjweaver/1.8.8/aspectjweaver-1.8.8.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-jdbc/1.3.2.release/spring-boot-starter-jdbc-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/tomcat-jdbc/8.0.30/tomcat-jdbc-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/tomcat-juli/8.0.30/tomcat-juli-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-jdbc/4.2.4.release/spring-jdbc-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/hibernate/hibernate-entitymanager/4.3.11.final/hibernate-entitymanager-4.3.11.final.jar, file:/c:/users/ayo/.m2/repository/org/jboss/logging/jboss-logging/3.3.0.final/jboss-logging-3.3.0.final.jar, file:/c:/users/ayo/.m2/repository/org/jboss/logging/jboss-logging-annotations/1.2.0.beta1/jboss-logging-annotations-1.2.0.beta1.jar, file:/c:/users/ayo/.m2/repository/org/hibernate/hibernate-core/4.3.11.final/hibernate-core-4.3.11.final.jar, file:/c:/users/ayo/.m2/repository/antlr/antlr/2.7.7/antlr-2.7.7.jar, file:/c:/users/ayo/.m2/repository/org/jboss/jandex/1.1.0.final/jandex-1.1.0.final.jar, file:/c:/users/ayo/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar, file:/c:/users/ayo/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar, file:/c:/users/ayo/.m2/repository/org/hibernate/common/hibernate-commons-annotations/4.0.5.final/hibernate-commons-annotations-4.0.5.final.jar, file:/c:/users/ayo/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.1-api/1.0.0.final/hibernate-jpa-2.1-api-1.0.0.final.jar, file:/c:/users/ayo/.m2/repository/org/javassist/javassist/3.18.1-ga/javassist-3.18.1-ga.jar, file:/c:/users/ayo/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar, file:/c:/users/ayo/.m2/repository/org/springframework/data/spring-data-jpa/1.9.2.release/spring-data-jpa-1.9.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/data/spring-data-commons/1.11.2.release/spring-data-commons-1.11.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-orm/4.2.4.release/spring-orm-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-tx/4.2.4.release/spring-tx-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-beans/4.2.4.release/spring-beans-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/slf4j/slf4j-api/1.7.13/slf4j-api-1.7.13.jar, file:/c:/users/ayo/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.13/jcl-over-slf4j-1.7.13.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-aspects/4.2.4.release/spring-aspects-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.3.2.release/spring-boot-starter-web-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.3.2.release/spring-boot-starter-tomcat-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.0.30/tomcat-embed-core-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.0.30/tomcat-embed-el-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.30/tomcat-embed-logging-juli-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.30/tomcat-embed-websocket-8.0.30.jar, file:/c:/users/ayo/.m2/repository/org/springframework/boot/spring-boot-starter-validation/1.3.2.release/spring-boot-starter-validation-1.3.2.release.jar, file:/c:/users/ayo/.m2/repository/org/hibernate/hibernate-validator/5.2.2.final/hibernate-validator-5.2.2.final.jar, file:/c:/users/ayo/.m2/repository/javax/validation/validation-api/1.1.0.final/validation-api-1.1.0.final.jar, file:/c:/users/ayo/.m2/repository/com/fasterxml/classmate/1.1.0/classmate-1.1.0.jar, file:/c:/users/ayo/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.5/jackson-databind-2.6.5.jar, file:/c:/users/ayo/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.6.5/jackson-annotations-2.6.5.jar, file:/c:/users/ayo/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.5/jackson-core-2.6.5.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-web/4.2.4.release/spring-web-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-webmvc/4.2.4.release/spring-webmvc-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-expression/4.2.4.release/spring-expression-4.2.4.release.jar, file:/c:/users/ayo/.m2/repository/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar, file:/c:/users/ayo/.m2/repository/org/springframework/spring-core/4.2.4.release/spring-core-4.2.4.release.jar, file:/c:/program%20files%20(x86)/jetbrains/intellij%20idea%2015.0/lib/idea_rt.jar] process finished exit code 1
thanks.
method1
you should change signature of method
list<report> findbytype(string reporttype);
into
list<report> findbytype(string type);
method 2
add @query
on findbytype method
@org.springframework.data.jpa.repository.query("select r report r r.type =?1") list<report> findbytype( string type)
Comments
Post a Comment