Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
230 views
in Technique[技术] by (71.8m points)

java - I am reciving a bean creation error with my security config class for spring security

these are the errors i am getting.. i can't seem to figure out why. i've rewritten the code more than a couple of times and went through the lessons. can someone please take a look? I am working on a basic spring project.

-Error creating bean with name 'securityConfig'

-Error creating bean with name 'usersMapper'

-Mapped Statements collection already contains value for com.udacity.jwdnd.course1.cloudstorage.mapper.UsersMapper.getUser

varun

question from:https://stackoverflow.com/questions/65944422/i-am-reciving-a-bean-creation-error-with-my-security-config-class-for-spring-sec

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the interface UsersMapper, you have two methods getUser(). Even if the signature are different, it seems to be not supported.

I suggest to rename the getUser(int id) by getUserById(int id) to solve the issue.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...