1.@Value标签 由于Spring对通过IOC的方式对对象进行统一管理,所以对任何对象而言,其生成方法均由Spring管理.传统的方法是通过XML配置每一个Bean,并对这个Bean的所有Field进行声明式配置. 以一个简单的学校的例子为示范.假设有两种角色,老师和班长. package org.kingszelda.version3.controller; /** * Created by shining.cui on 2017/7/30. */ public class Teacher
基础 字符串:python 中字符串可以用单引号.双引号和三个引号括起来,其中三个引号可以用来指定多行的字符串. print('hello'* 3) 连续打印 3 个 hello 格式化:print 方法默认是换行的,可以通过 end 指定其应以空白结尾:print('a', end='') name = 'Tom' print('my name is {0}'.format(name)) print('my name is {}'.format(name)) #可以去掉占位符中的数字 prin
本文依赖于一个基础却又容易混淆的css知识点:当margin/padding取形式为百分比的值时,无论是left/right,还是top/bottom,都是以父元素的width为参照物的!也许你会说,left/right以父元素的width为参照物好理解,但是top/bottom为什么也是以父元素的width为参照物的呢?网上众说纷纭,关键还是看W3C的规范: Note that in a horizontal flow, percentages on 'margin-top' and 'mar
static - default and this is the FLOW. ------------------------------------------------------------------------------------------------------------------------- relative - postition determined by first STATIC element. top.bottom.left.right 保持文档流,占空间—