Repositories in Spring MVC
up vote
-2
down vote
favorite
@service
class EmployeeServiceImpl implements EmployeeService{
@Autowired
EmployeeDAO
}
-----------------------------------------------------------------
interface EmployeeDAO extends Repository<T,id>{
// sql queries....
}
------
I want to AutoWired interface in serviceImpl class is it possible then how?
DAO interface doesnot have any child classes.
spring spring-data repository
New contributor
add a comment |
up vote
-2
down vote
favorite
@service
class EmployeeServiceImpl implements EmployeeService{
@Autowired
EmployeeDAO
}
-----------------------------------------------------------------
interface EmployeeDAO extends Repository<T,id>{
// sql queries....
}
------
I want to AutoWired interface in serviceImpl class is it possible then how?
DAO interface doesnot have any child classes.
spring spring-data repository
New contributor
Give a response about the answer provided !
– Avijit Barua
15 hours ago
add a comment |
up vote
-2
down vote
favorite
up vote
-2
down vote
favorite
@service
class EmployeeServiceImpl implements EmployeeService{
@Autowired
EmployeeDAO
}
-----------------------------------------------------------------
interface EmployeeDAO extends Repository<T,id>{
// sql queries....
}
------
I want to AutoWired interface in serviceImpl class is it possible then how?
DAO interface doesnot have any child classes.
spring spring-data repository
New contributor
@service
class EmployeeServiceImpl implements EmployeeService{
@Autowired
EmployeeDAO
}
-----------------------------------------------------------------
interface EmployeeDAO extends Repository<T,id>{
// sql queries....
}
------
I want to AutoWired interface in serviceImpl class is it possible then how?
DAO interface doesnot have any child classes.
spring spring-data repository
spring spring-data repository
New contributor
New contributor
edited Nov 8 at 9:26
Avijit Barua
8871215
8871215
New contributor
asked Nov 8 at 5:21
Bharat Kumar
12
12
New contributor
New contributor
Give a response about the answer provided !
– Avijit Barua
15 hours ago
add a comment |
Give a response about the answer provided !
– Avijit Barua
15 hours ago
Give a response about the answer provided !
– Avijit Barua
15 hours ago
Give a response about the answer provided !
– Avijit Barua
15 hours ago
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Yes you can do this. But seems interface EmployeeDAO extends Repository<T,id>
is generic method. By the way you have to autowired in this way
@Autowired
EmployeeDAO employeeDAO;
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Yes you can do this. But seems interface EmployeeDAO extends Repository<T,id>
is generic method. By the way you have to autowired in this way
@Autowired
EmployeeDAO employeeDAO;
add a comment |
up vote
0
down vote
Yes you can do this. But seems interface EmployeeDAO extends Repository<T,id>
is generic method. By the way you have to autowired in this way
@Autowired
EmployeeDAO employeeDAO;
add a comment |
up vote
0
down vote
up vote
0
down vote
Yes you can do this. But seems interface EmployeeDAO extends Repository<T,id>
is generic method. By the way you have to autowired in this way
@Autowired
EmployeeDAO employeeDAO;
Yes you can do this. But seems interface EmployeeDAO extends Repository<T,id>
is generic method. By the way you have to autowired in this way
@Autowired
EmployeeDAO employeeDAO;
answered Nov 8 at 8:32
Avijit Barua
8871215
8871215
add a comment |
add a comment |
Bharat Kumar is a new contributor. Be nice, and check out our Code of Conduct.
Bharat Kumar is a new contributor. Be nice, and check out our Code of Conduct.
Bharat Kumar is a new contributor. Be nice, and check out our Code of Conduct.
Bharat Kumar is a new contributor. Be nice, and check out our Code of Conduct.
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
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53201966%2frepositories-in-spring-mvc%23new-answer', 'question_page');
}
);
Post as a guest
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
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
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
Give a response about the answer provided !
– Avijit Barua
15 hours ago