子曰:“吾十有五而志于学,三十而立,四十而不惑,五十而知天命,六十而耳顺,七十而从心所欲,不逾矩。”
可见孔子也不是天生的圣人,也在不停地学习、进步,从“志于学”到“从心所欲,不逾矩”,孔子一共花了55年的时间。
简单即美,keep it simple and stupid
When people ask me for advice on blogging, I always respond with yet another form of the same advice: pick a schedule you can live with, and stick to it. Until you do that, none of the other advice I could give you will matter. I don’t care if you suck at writing. I don’t care if nobody reads your blog. I don’t care if you have nothing interesting to say. If you can demonstrate a willingness to write, and a desire to keep continually improving your writing, you will eventually be successful.
出自于 https://blog.codinghorror.com/how-to-achieve-ultimate-blog-success-in-one-easy-step/
大意如下:
当别人请我给他们一些写 blog 的建议,我总是回他:挑个你自认为可以的时间行程安排,什么时候开始写 blog,预计多久写一篇文,开始动工,并坚持下去。在你这么做之前,任何建议对你来说都是不重要的。你文章是否写得很糟糕不重要,是否没有任何人会看你的 blog 不重要,是不是没啥有趣的东西可以纪录也不重要。重要的是,只要你能透过写文来表现出写作的意愿,而且渴望持续地写作,检视、思考与改善自己的写作,你终究会成功的。
1 | 一个方法运行在 另一个已经开启事务的方法中,当前方法是使用本身的事务还是开启一个新到的事务 |
最后更新时间: 2019年3月28日17:47:14
Spring中Bean对象的作用域
可以通弄过scope属性来指定bean的作用域
singleton:默认值。当IOC容器一旦创建,就会创建bean对象的实例。而且是单例的,每次得到的都是同一个。
prototype:原型的。当IOC容器一旦创建不再实例化该bean对象,每次调用getBean方法时再实例化该bean,而且每调用一次,对象都不同。
request:每次请求实例化一个bean对象
session:在一次会话中共享一个bean