August 16, 2013

  • 真係睇唔明spring 果堆configuration同annotation

    開左幾十個stackoverflow都係睇唔明
    或者係我無心機睇=__=

    只不過想inject a value to a controller property from a properties file by @Value(‘$(property.key)’)

    搞左成個幾鐘都搞唔到,最後用番D基本方法,開個Constant bean
    做番getter setter
    <bean id = “adsf” class = “Constant”><….value = {property.key}…></bean>算

    跟住又鬧我getter唔可以係static…
    咁我想果個係static variable 丫麻梗係static架喇

    我知道spring 果D context都有inheritance…
    我知道applicationContext.xml同dispatcher.xml係有D唔同
    我知道spring會幫我instantiate @Controller

    整整下個network死Q左,全香港都駁唔到番深圳
    又浪費左兩個鐘

    做左大半年project都仲係成舊飯咁

Post a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts

Recent Comments

Categories