java


Possible to configure more repositoryFactoryBeanClass in a spring boot, or need another work around?


I have a class which extend the standard spring data jparepository with some more functionality, it's work fine, i successfully manage to configure it, but now i created an another repository, with some more functionality.
#Configuration
#EnableJpaRepositories(entityManagerFactoryRef = "appmainEntityManagerFactory",
transactionManagerRef = "appmainTransactionManager", basePackages = {"hu.rfit.some.repositoy", "hu.rfit.some.more....."},
repositoryFactoryBeanClass = AjaxSearchRepositoryFactoryBean.class)
public class DatasourceConfig {
//some irrelevant other settings...
}
I created my repositories, and my repository factory bean according to this article, It's work fine, but then when i created an another repository and want to use both it's instantly break at start up. I have no idea how to configure it since repositoryFactoryBeanClass only accept one class.
this is the repositories in question:
#NoRepositoryBean
public interface AddressRepository<T, ID extends Serializable> {
AjaxSearchOutput<String> getAddresses(AjaxSearchInput input, String addressPath);
}
#NoRepositoryBean
public interface AjaxSearchRepository<T, ID extends Serializable> extends PagingAndSortingRepository<T, ID>, JpaSpecificationExecutor<T> {
AjaxSearchOutput<T> findAll(AjaxSearchInput input);
AjaxSearchOutput<T> findAll(AjaxSearchInput input, Specification<T> additionalSpecification);
}
Whenever i wan to use both how it's ment to be used my app fail during startup with BeanCreationException
#Repository
public interface EmptyplaceRepository extends AjaxSearchRepository<EmptyplaceEntity, Long>, AddressRepository<EmptyplaceEntity, Long> {}
Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'emptyplaceRepository': Invocation of
init method failed; nested exception is
org.springframework.data.mapping.PropertyReferenceException: No
property getAddresses found for type EmptyplaceEntity! at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
~[spring-beans-4.2.7.RELEASE.jar:4.2.7.RELEASE]
...
Caused by:
org.springframework.data.mapping.PropertyReferenceException: No
property getAddresses found for type EmptyplaceEntity!
How can i create and use more repository in my spring boot app?

Related Links

Testing Realm under Android
memory efficient storage of set of integers for java [duplicate]
How to separate methods from a java class [duplicate]
Removing punctuation marks in java
How to print two 2D double arrays?
Strange behaviour with ConnectionFactory using CDI with Tomcat 7
Android UnityPlayerActivity Action Bar
Native Error: [25037] - There is not enough disk space left for the Database (Windows Compact)
Retrieve data from Json through php in android?
Calculate time between dates in list
Java= arbitrary placement of if statement gives different output? [duplicate]
Do Orphaned object in java lead to performance Issues [duplicate]
How do I mock an object of a class with parameterized constructor?
How to concatenate strings in Java?
How can I convert java.util.Calendar to org.quartz.impl.calendar.DailyCalendar?
Lose focus when user clicks outside Node's bound in JavaFX

Categories

HOME
xamarin
winforms
debugging
minimum-spanning-tree
cvs
cakephp-2.5
podio
pheatmap
qt-creator
usergrid
flask-wtforms
google-static-maps
zapier
cloudhub
pepper
chromebook
url-scheme
user-interaction
applozic
bpel
perlin-noise
webtest
ghost4j
fusionpbx
automake
az-application-insights
uft-api
sqlite2
mapzen
sfdc
reportingservices-2005
http-live-streaming
nxlog
wptoolkit
azure-application-gateway
termination
komodoedit
dandelion
color-picker
spring-android
angular-cache
sts-springsourcetoolsuite
bluemix-app-scan
ford-fulkerson
kendonumerictextbox
icu4j
retina
simple-framework
feedback
coveralls
map-projections
myo
dia
tablelayout
phalanger
googlemock
mbr
runtime.exec
plasma
google-email-migration
pysimplesoap
automount
javaspaces
chrono
asyncfileupload
nsdatecomponents
data-loss
external-accessory
winbugs14
subviews
dbal
castle-monorail
ctp4
xetex
yagni
putchar
uiq3

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App