I am really impressed! These videos are high quality in every aspekt - good didactics, clear accentfree voice, pleasant degree of difficulty, to name a few. Thx a lot!!!
The whole spring tutorial from 1 to 24 is absolutely amazing.I have been working on spring projects without any reading. Could clear interviews due o lack of technical terms. As i have worked already now can relate to all that absolutely clear.Its a very simplified to the point tutorial
Hi yes, With all Respect to Java Brains idRef concept is wrongly explained. Even the tag is wrong. Actual tag is when you use it in some example say as below :
then it is same as
so instead of reference to bean it actually returns string "bean name" which happens to be "point" in above example.
Koushik your tutorial are always best i just want to add on idref just need to correct idref is only working with respect to string value this is spring doc The idref element is simply an error-proof way to pass the id (string value - not a reference) of another bean in the container to a or element.
If you give an unexisting bean id to idref bean prop, container throws BeanDefinitionStoreException. If the bean exists, at this time it throws ConversionNotSupported and BeanCreationException. The purpose of the idref usage is to check if it exists or unexists, i think.
I tried this tutorial and the line idref that he used didnt work for me. Yet swapping out idref for ref but adding bean=point3 works. Even trying idref bean="point3" doesnt work. Do you know why this is the case? Wondering perhaps this is based off an older ver of the API?
For me (idref bean="zeroPoint")(/idref) too didn't work. But the syntax that VenkatLaks suggested solved the issue finally. I think it depends on the eclipse version we are using. That's why it worked for Koushik in the video and not for us. M using Eclipse Juno.
@NullPointerDude that's right, but it doesn't fixed neither with local="zeroPoint" still have Exception: Element type "idref" must be followed by either attribute specifications, ">" or "/>".
When the first time you assign an alias to the bean triangle, you currently have not assigned any name to it previously . So how does the XML associate the Name = " triangle" with the bean id = "triangle" ? ?? does it consider both of them to be the same ? i .e, name and id of triangle ?
will give an exception because the idref checks for String euqalization not the Point Object with some other bean with the id="zeroBean" but here we are having the Point object instead of the string that's why it will return the java.lang.IllegalStateException and no matching editors or conversion strategy found because as it is assigning the string value but we are using the Point object bean
@cachwahed Hey guys, I am following this video as well and I fixed this 'conversion' error by doing half an hour of intensive research. lol. Anyway here is the fix: (property name="pointA") (ref local="zeroPoint"/) (/property) The reason for this is that idref is to refer to a bean as a String value (hence cannot convert String to Object). One must use (ref local="myBean"/) instead of (idref). Why? I don't know, but what I read on here:
I encountered one error in this video. At the very end, eclipse did not like the idref syntax . I had to modify the line for it to work: (idref bean="zeroPoint")(/idref) Note: had to give the tags parentheses so youtube would accept the comment
How can we initialize the bean using constructor of our own choice in xml? I mean if we have three constructor then how can we use 1st constructor for initializing first bean 2nd constructor for initializing 2nd bean and so on?
hi koushik, please revisit idref and ref tag usage. In my case, idref does not work. spring complains with the below error. But if I replace tag with everything works fine. ---------------------------------------------------------------------------------- Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'org.koushik.javabrains.Point' for property 'pointA'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'org.koushik.javabrains.Point' for property 'pointA': no matching editors or conversion strategy found ----------------------------------------------------------------------------------
Please create your free videos for learning purpose if you really has good knowledge...if not stop criticizing people who are really helping people providing such learning topics.
+Prashanth YP Check the docs docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-idref-element It is an foolproof way to send only String value & not reference. Java Brains understanding was wrong. It accepts name & id of a bean.
The above bean definition snippet is exactly equivalent (at runtime) to the following snippet: The first form is preferable to the second, because using the idref tag allows the container to validate at deployment time that the referenced, named bean actually exists.
Hi yes, With all Respect to Java Brains idRef concept is wrongly explained. Even the tag is wrong. Actual tag is when you use it in some example say as below :
then it is same as so instead of reference to bean it actually returns string "bean name" which happens to be "point" in above example.
I am really impressed! These videos are high quality in every aspekt - good didactics, clear accentfree voice, pleasant degree of difficulty, to name a few. Thx a lot!!!
In spring 4.2, the following is needed for bean references:
It will not work, because is not at all the same as . It is the same as .
The whole spring tutorial from 1 to 24 is absolutely amazing.I have been working on spring projects without any reading. Could clear interviews due o lack of technical terms. As i have worked already now can relate to all that absolutely clear.Its a very simplified to the point tutorial
Hi yes,
With all Respect to Java Brains
idRef concept is wrongly explained. Even the tag is wrong.
Actual tag is
when you use it in some example say as below :
then it is same as
so instead of reference to bean it actually returns string "bean name" which happens to be "point" in above example.
Yes. You are right. The tag is used to create a String-typed value equal to the ID of the referred bean and is intended for validation purposes
I think idref part was not executed and no demo was shown...
You have very good teaching techniques. Thank you for your efforts. Please create small projects that helps us in real world work environment.
Believe me ... one day u will rise to power!!!!!
wow, best tutorial available !! Thanks man ..these tutorials are really very easy to grasp the concept :)
this is a great tutorial! Thanks for all the work u've done!
Good Videos.. The way you speak is good. Sounds processional.
Neat! Thank you for these series. You're the best.
Koushik your tutorial are always best i just want to add on idref just need to correct idref is only working with respect to string value
this is spring doc
The idref element is simply an error-proof way to pass the id (string value - not a reference) of another bean in the container to a or element.
idref concept is wrongly explained in this tutorial
Definitely.
Was waiting for it from a long time! Thanks!
very good explanation..Thank you very much sir..
Thank you for that.It was baffling me until I saw your comment.
using local instead of bean attribute is the preferred one as per the API documentation. In this example:
Not worked this as well, is there any other ways?
If you give an unexisting bean id to idref bean prop, container throws BeanDefinitionStoreException. If the bean exists, at this time it throws ConversionNotSupported and BeanCreationException. The purpose of the idref usage is to check if it exists or unexists, i think.
nice explination ....thank you.........
Which state (of India) are you from? And where are you currently staying?
No, nothing personal, just curious...
The last one "idref" should be:
Exactly. And is not for Objects !!
Great Videos Java Brains...
I tried this tutorial and the line idref that he used didnt work for me. Yet swapping out idref for ref but adding bean=point3 works. Even trying idref bean="point3" doesnt work. Do you know why this is the case? Wondering perhaps this is based off an older ver of the API?
The concept of "idref" is incorrect & facing issues with execution. Please correct the same in the tutorial
How to learn the same concepts in spring boot
For me (idref bean="zeroPoint")(/idref) too didn't work. But the syntax that VenkatLaks suggested solved the issue finally. I think it depends on the eclipse version we are using. That's why it worked for Koushik in the video and not for us. M using Eclipse Juno.
@NullPointerDude
that's right, but it doesn't fixed neither with local="zeroPoint"
still have Exception: Element type "idref" must be followed by either attribute specifications, ">" or "/>".
When the first time you assign an alias to the bean triangle, you currently have not assigned any name to it previously . So how does the XML associate the Name = " triangle" with the bean id = "triangle" ? ?? does it consider both of them to be the same ? i .e, name and id of triangle ?
Yes, I think so
as the
will give an exception because the idref checks for String euqalization not the Point Object with some other bean with the id="zeroBean"
but here we are having the Point object instead of the string that's why it will return the java.lang.IllegalStateException and no matching editors or conversion strategy found
because as it is assigning the string value but we are using the Point object bean
Any solutions to this problem ?
It worked for me in the first time. I am using Eclipse Juno
Version: Juno Service Release 2
You probably typed something in wrong.
@cachwahed Hey guys, I am following this video as well and I fixed this 'conversion' error by doing half an hour of intensive research. lol. Anyway here is the fix:
(property name="pointA")
(ref local="zeroPoint"/)
(/property)
The reason for this is that idref is to refer to a bean as a String value (hence cannot convert String to Object).
One must use (ref local="myBean"/) instead of (idref). Why? I don't know, but what I read on here:
I hope you realize your "triangle" in these examples is actually a line. The y-coordinate is always 0.
Damn.
I encountered one error in this video. At the very end, eclipse did not like the idref syntax .
I had to modify the line for it to work:
(idref bean="zeroPoint")(/idref)
Note: had to give the tags parentheses so youtube would accept the comment
How can we initialize the bean using constructor of our own choice in xml? I mean if we have three constructor then how can we use 1st constructor for initializing first bean 2nd constructor for initializing 2nd bean and so on?
depends on the number of args in the constructors and types... you can use index from video 6 i believe
Thank you very much.
my idref is not working..could you please help me on this
use it as
Not working with
anything else need to be defined?
hi koushik,
please revisit idref and ref tag usage. In my case, idref does not work. spring complains with the below error.
But if I replace tag with everything works fine.
----------------------------------------------------------------------------------
Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.lang.String' to required type 'org.koushik.javabrains.Point' for property 'pointA'; nested exception is java.lang.IllegalStateException: Cannot convert value of type 'java.lang.String' to required type 'org.koushik.javabrains.Point' for property 'pointA': no matching editors or conversion strategy found
----------------------------------------------------------------------------------
Not explained inner beans with different scopes
Thanks Sir...
idref wrongly explained. It is a means to pass a String value not a reference to another bean.
@Mansukhdeep, could you please assist the correct tag for , I read many article but didn't get understand.
I thought classes of beans were singleton!
Please create your free videos for learning purpose if you really has good knowledge...if not stop criticizing people who are really helping people providing such learning topics.
👍
Your understanding of the idref tag is COMPLETELY WRONG. Check out the spring documentation.
..or just avoid aliases.
Anyone else think its funny that his triangle in a line?
I felt the same .... but thats not what we are emphasizing here .. so its not fair to say that
owner is surely not explaining trigonometry so it doesn't matter
idref problem is getting bigger..anybody?
+Prashanth YP
Check the docs
docs.spring.io/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-idref-element
It is an foolproof way to send only String value & not reference. Java Brains understanding was wrong. It accepts name & id of a bean.
The above bean definition snippet is exactly equivalent (at runtime) to the following snippet:
The first form is preferable to the second, because using the idref tag allows the container to validate at deployment time that the referenced, named bean actually exists.
Actually its a Line !! ;p
No it's just you.
:)
Bro, Actually the three points are collinear, a triangle cannot exist!!!🤣🤣🤣
SJC Cadet Patoon 1983
idref is wrongly explained I think
I am pretty sure that the idref is wrongly explained, the correct explanation here stackoverflow.com/questions/14607142/spring-idref-usage
Hi yes,
With all Respect to Java Brains
idRef concept is wrongly explained. Even the tag is wrong.
Actual tag is
when you use it in some example say as below :
then it is same as
so instead of reference to bean it actually returns string "bean name" which happens to be "point" in above example.
what is the correct tag
the correct syntax is:
Now is: :D