Could not autowire. No beans of 'InstructionRepository' type foundAutowiring two beans implementing same interface - how to set default bean to autowire?@Autowired - No qualifying bean of type found for dependencyAvoid autowiring beans created with factorySpring 4 bean autowiring with genericsSpring Boot - Autowiring a DataSource BeanSpring Boot: autowire beans from library projectIn springboot autowired is not working, always null?Could not autowire SessionRegistry in spring bootParameter 0 of constructor in required a bean of type 'java.lang.String' that could not be foundjava.lang.NullPointerException: null on AutoWiring a bean in StandAlone App

How did the SysRq key get onto modern keyboards if it's rarely used?

Why put copper in between battery contacts and clamps?

Just how much information should you share with a former client?

Why does the Eurostar not show youth pricing?

Complaints from (junior) developers against solution architects: how can we show the benefits of our work and improve relationships?

Why are we moving in circles with a tandem kayak?

How can I kill my goat?

To find islands of 1 and 0 in matrix

How should I quote American English speakers in a British English essay?

My employer is refusing to give me the pay that was advertised after an internal job move

Why force the nose of 737 Max down in the first place?

If the Moon were impacted by a suitably sized meteor, how long would it take to impact the Earth?

Wrapping IMemoryCache with SemaphoreSlim

Was Donald Trump at ground zero helping out on 9-11?

Why were contact sensors put on three of the Lunar Module's four legs? Did they ever bend and stick out sideways?

Can a US President, after impeachment and removal, be re-elected or re-appointed?

Alternatives to minimizing loss in regression

Why does Canada require bilingualism in a lot of federal government posts?

Is it safe if the neutral lead is exposed and disconnected?

Should I intervene when a colleague in a different department makes students run laps as part of their grade?

How to season a character?

What is more environmentally friendly? An A320 or a car?

What do you call people who give out awards, certificates and trophies?

Why did House of Representatives need to condemn Trumps Tweets?



Could not autowire. No beans of 'InstructionRepository' type found


Autowiring two beans implementing same interface - how to set default bean to autowire?@Autowired - No qualifying bean of type found for dependencyAvoid autowiring beans created with factorySpring 4 bean autowiring with genericsSpring Boot - Autowiring a DataSource BeanSpring Boot: autowire beans from library projectIn springboot autowired is not working, always null?Could not autowire SessionRegistry in spring bootParameter 0 of constructor in required a bean of type 'java.lang.String' that could not be foundjava.lang.NullPointerException: null on AutoWiring a bean in StandAlone App






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








-1















Trying to create a bean in SpringBoot application, but getting the following error "Could not autowire. No beans of 'InstructionRepository' type found."



InstructionRepository is annotated with @Repository annotation in the jar and is an Interface extending a Spring Data Interface



ScheduleProcessor is a method



When I Try adding the @ComponentScan annotation by passing the base package value, the error goes away BUT, when I boot up the application get the following error



Parameter 0 of constructor in com.xxx.resync.config.AppConfig required a bean of type 'com.xxx.repo.InstructionRepository' that could not be found. Action: Consider defining a bean of type 'com.xxx.repo.InstructionRepository' in your configuration.



@Configuration
@EnableAutoConfiguration
//@ComponentScan(basePackages = "com.xxx.repo")
public class AppConfig

@Value("$pssHttp.connectTimeout:3000")
private int connectTimeout;

@Bean
public RestTemplate getRestTemplate()
RestTemplate restTemplate = new RestTemplate();
final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
factory.setConnectTimeout(connectTimeout);
factory.setReadTimeout(connectTimeout);
restTemplate.setRequestFactory(factory);
return restTemplate;


@Bean
public ScheduleUpdater getScheduleUpdater()
return new ScheduleUpdater(true);


@Bean
public ScheduleProcessor scheduleProcessor(InstructionRepository instructionRepository, ScheduleUpdater scheduleUpdater)
return new ScheduleProcessor(instructionRepository, scheduleUpdater);




InstructionRepository



@Repository
public interface InstructionRepository extends CouchbaseRepository<Instruction, String>




How can we fix the error and be able to boot up the Spring boot application?



Any suggestions appreciated.










share|improve this question






























    -1















    Trying to create a bean in SpringBoot application, but getting the following error "Could not autowire. No beans of 'InstructionRepository' type found."



    InstructionRepository is annotated with @Repository annotation in the jar and is an Interface extending a Spring Data Interface



    ScheduleProcessor is a method



    When I Try adding the @ComponentScan annotation by passing the base package value, the error goes away BUT, when I boot up the application get the following error



    Parameter 0 of constructor in com.xxx.resync.config.AppConfig required a bean of type 'com.xxx.repo.InstructionRepository' that could not be found. Action: Consider defining a bean of type 'com.xxx.repo.InstructionRepository' in your configuration.



    @Configuration
    @EnableAutoConfiguration
    //@ComponentScan(basePackages = "com.xxx.repo")
    public class AppConfig

    @Value("$pssHttp.connectTimeout:3000")
    private int connectTimeout;

    @Bean
    public RestTemplate getRestTemplate()
    RestTemplate restTemplate = new RestTemplate();
    final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
    factory.setConnectTimeout(connectTimeout);
    factory.setReadTimeout(connectTimeout);
    restTemplate.setRequestFactory(factory);
    return restTemplate;


    @Bean
    public ScheduleUpdater getScheduleUpdater()
    return new ScheduleUpdater(true);


    @Bean
    public ScheduleProcessor scheduleProcessor(InstructionRepository instructionRepository, ScheduleUpdater scheduleUpdater)
    return new ScheduleProcessor(instructionRepository, scheduleUpdater);




    InstructionRepository



    @Repository
    public interface InstructionRepository extends CouchbaseRepository<Instruction, String>




    How can we fix the error and be able to boot up the Spring boot application?



    Any suggestions appreciated.










    share|improve this question


























      -1












      -1








      -1








      Trying to create a bean in SpringBoot application, but getting the following error "Could not autowire. No beans of 'InstructionRepository' type found."



      InstructionRepository is annotated with @Repository annotation in the jar and is an Interface extending a Spring Data Interface



      ScheduleProcessor is a method



      When I Try adding the @ComponentScan annotation by passing the base package value, the error goes away BUT, when I boot up the application get the following error



      Parameter 0 of constructor in com.xxx.resync.config.AppConfig required a bean of type 'com.xxx.repo.InstructionRepository' that could not be found. Action: Consider defining a bean of type 'com.xxx.repo.InstructionRepository' in your configuration.



      @Configuration
      @EnableAutoConfiguration
      //@ComponentScan(basePackages = "com.xxx.repo")
      public class AppConfig

      @Value("$pssHttp.connectTimeout:3000")
      private int connectTimeout;

      @Bean
      public RestTemplate getRestTemplate()
      RestTemplate restTemplate = new RestTemplate();
      final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
      factory.setConnectTimeout(connectTimeout);
      factory.setReadTimeout(connectTimeout);
      restTemplate.setRequestFactory(factory);
      return restTemplate;


      @Bean
      public ScheduleUpdater getScheduleUpdater()
      return new ScheduleUpdater(true);


      @Bean
      public ScheduleProcessor scheduleProcessor(InstructionRepository instructionRepository, ScheduleUpdater scheduleUpdater)
      return new ScheduleProcessor(instructionRepository, scheduleUpdater);




      InstructionRepository



      @Repository
      public interface InstructionRepository extends CouchbaseRepository<Instruction, String>




      How can we fix the error and be able to boot up the Spring boot application?



      Any suggestions appreciated.










      share|improve this question














      Trying to create a bean in SpringBoot application, but getting the following error "Could not autowire. No beans of 'InstructionRepository' type found."



      InstructionRepository is annotated with @Repository annotation in the jar and is an Interface extending a Spring Data Interface



      ScheduleProcessor is a method



      When I Try adding the @ComponentScan annotation by passing the base package value, the error goes away BUT, when I boot up the application get the following error



      Parameter 0 of constructor in com.xxx.resync.config.AppConfig required a bean of type 'com.xxx.repo.InstructionRepository' that could not be found. Action: Consider defining a bean of type 'com.xxx.repo.InstructionRepository' in your configuration.



      @Configuration
      @EnableAutoConfiguration
      //@ComponentScan(basePackages = "com.xxx.repo")
      public class AppConfig

      @Value("$pssHttp.connectTimeout:3000")
      private int connectTimeout;

      @Bean
      public RestTemplate getRestTemplate()
      RestTemplate restTemplate = new RestTemplate();
      final HttpComponentsClientHttpRequestFactory factory = new HttpComponentsClientHttpRequestFactory();
      factory.setConnectTimeout(connectTimeout);
      factory.setReadTimeout(connectTimeout);
      restTemplate.setRequestFactory(factory);
      return restTemplate;


      @Bean
      public ScheduleUpdater getScheduleUpdater()
      return new ScheduleUpdater(true);


      @Bean
      public ScheduleProcessor scheduleProcessor(InstructionRepository instructionRepository, ScheduleUpdater scheduleUpdater)
      return new ScheduleProcessor(instructionRepository, scheduleUpdater);




      InstructionRepository



      @Repository
      public interface InstructionRepository extends CouchbaseRepository<Instruction, String>




      How can we fix the error and be able to boot up the Spring boot application?



      Any suggestions appreciated.







      spring-boot spring-data-jpa javabeans autowired






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 20:28









      Sai Prakash NarasinguSai Prakash Narasingu

      458 bronze badges




      458 bronze badges

























          1 Answer
          1






          active

          oldest

          votes


















          0














          You need to add @EnableCouchbaseRepositories to enable repo building eg to AppConfig.






          share|improve this answer



























          • Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

            – Sai Prakash Narasingu
            Mar 26 at 21:03











          • its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

            – Antoniossss
            Mar 26 at 21:03











          • You have to use @EnableCouchbaseRepositories

            – Antoniossss
            Mar 26 at 21:04











          • Added in the AppConfig, but still having the same error.

            – Sai Prakash Narasingu
            Mar 26 at 21:07











          • add like this @EnableJpaRepositories("com.xxx.repo")

            – Deadpool
            Mar 26 at 21:13










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365707%2fcould-not-autowire-no-beans-of-instructionrepository-type-found%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You need to add @EnableCouchbaseRepositories to enable repo building eg to AppConfig.






          share|improve this answer



























          • Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

            – Sai Prakash Narasingu
            Mar 26 at 21:03











          • its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

            – Antoniossss
            Mar 26 at 21:03











          • You have to use @EnableCouchbaseRepositories

            – Antoniossss
            Mar 26 at 21:04











          • Added in the AppConfig, but still having the same error.

            – Sai Prakash Narasingu
            Mar 26 at 21:07











          • add like this @EnableJpaRepositories("com.xxx.repo")

            – Deadpool
            Mar 26 at 21:13















          0














          You need to add @EnableCouchbaseRepositories to enable repo building eg to AppConfig.






          share|improve this answer



























          • Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

            – Sai Prakash Narasingu
            Mar 26 at 21:03











          • its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

            – Antoniossss
            Mar 26 at 21:03











          • You have to use @EnableCouchbaseRepositories

            – Antoniossss
            Mar 26 at 21:04











          • Added in the AppConfig, but still having the same error.

            – Sai Prakash Narasingu
            Mar 26 at 21:07











          • add like this @EnableJpaRepositories("com.xxx.repo")

            – Deadpool
            Mar 26 at 21:13













          0












          0








          0







          You need to add @EnableCouchbaseRepositories to enable repo building eg to AppConfig.






          share|improve this answer















          You need to add @EnableCouchbaseRepositories to enable repo building eg to AppConfig.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 26 at 21:05

























          answered Mar 26 at 20:38









          AntoniossssAntoniossss

          18.3k2 gold badges26 silver badges61 bronze badges




          18.3k2 gold badges26 silver badges61 bronze badges















          • Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

            – Sai Prakash Narasingu
            Mar 26 at 21:03











          • its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

            – Antoniossss
            Mar 26 at 21:03











          • You have to use @EnableCouchbaseRepositories

            – Antoniossss
            Mar 26 at 21:04











          • Added in the AppConfig, but still having the same error.

            – Sai Prakash Narasingu
            Mar 26 at 21:07











          • add like this @EnableJpaRepositories("com.xxx.repo")

            – Deadpool
            Mar 26 at 21:13

















          • Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

            – Sai Prakash Narasingu
            Mar 26 at 21:03











          • its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

            – Antoniossss
            Mar 26 at 21:03











          • You have to use @EnableCouchbaseRepositories

            – Antoniossss
            Mar 26 at 21:04











          • Added in the AppConfig, but still having the same error.

            – Sai Prakash Narasingu
            Mar 26 at 21:07











          • add like this @EnableJpaRepositories("com.xxx.repo")

            – Deadpool
            Mar 26 at 21:13
















          Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

          – Sai Prakash Narasingu
          Mar 26 at 21:03





          Unable to find a maven dependency for EnableJpaRepositories, how do we add this dependency

          – Sai Prakash Narasingu
          Mar 26 at 21:03













          its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

          – Antoniossss
          Mar 26 at 21:03





          its part of spring data docs.spring.io/spring-data/data-jpa/docs/current/api/org/…

          – Antoniossss
          Mar 26 at 21:03













          You have to use @EnableCouchbaseRepositories

          – Antoniossss
          Mar 26 at 21:04





          You have to use @EnableCouchbaseRepositories

          – Antoniossss
          Mar 26 at 21:04













          Added in the AppConfig, but still having the same error.

          – Sai Prakash Narasingu
          Mar 26 at 21:07





          Added in the AppConfig, but still having the same error.

          – Sai Prakash Narasingu
          Mar 26 at 21:07













          add like this @EnableJpaRepositories("com.xxx.repo")

          – Deadpool
          Mar 26 at 21:13





          add like this @EnableJpaRepositories("com.xxx.repo")

          – Deadpool
          Mar 26 at 21:13








          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid …


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55365707%2fcould-not-autowire-no-beans-of-instructionrepository-type-found%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?