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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          SQL error code 1064 with creating Laravel foreign keysForeign key constraints: When to use ON UPDATE and ON DELETEDropping column with foreign key Laravel error: General error: 1025 Error on renameLaravel SQL Can't create tableLaravel Migration foreign key errorLaravel php artisan migrate:refresh giving a syntax errorSQLSTATE[42S01]: Base table or view already exists or Base table or view already exists: 1050 Tableerror in migrating laravel file to xampp serverSyntax error or access violation: 1064:syntax to use near 'unsigned not null, modelName varchar(191) not null, title varchar(191) not nLaravel cannot create new table field in mysqlLaravel 5.7:Last migration creates table but is not registered in the migration table

          은진 송씨 목차 역사 본관 분파 인물 조선 왕실과의 인척 관계 집성촌 항렬자 인구 같이 보기 각주 둘러보기 메뉴은진 송씨세종실록 149권, 지리지 충청도 공주목 은진현