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;
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
add a comment |
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
add a comment |
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
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
spring-boot spring-data-jpa javabeans autowired
asked Mar 26 at 20:28
Sai Prakash NarasinguSai Prakash Narasingu
458 bronze badges
458 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You need to add @EnableCouchbaseRepositories
to enable repo building eg to AppConfig
.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
You need to add @EnableCouchbaseRepositories
to enable repo building eg to AppConfig
.
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
add a comment |
You need to add @EnableCouchbaseRepositories
to enable repo building eg to AppConfig
.
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
add a comment |
You need to add @EnableCouchbaseRepositories
to enable repo building eg to AppConfig
.
You need to add @EnableCouchbaseRepositories
to enable repo building eg to AppConfig
.
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
add a comment |
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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