spring-boot-starter-web
添加了Tomcat和Spring MVC,所以auto-configuration将假定你正在开发一个web应用并相应地对Spring进行设置。@ Configuration 注解,以明确指出该类是 Bean 配置的信息源@ComponentScan 注解会告知Spring扫描指定的包来初始化Spring Bean这能够确保我们声明的Bean能够被发现。@ImportResource 注解加载XML配置文件@EnableAutoConfiguration (exclude={xxxx.class}) 禁用特定的自动配置@SpringBootApplication 注解等价于以默认属性使用 @Configuration,@EnableAutoConfiguration和 @ComponentScan。@SuppressWarnings注解@SuppressWarnings("unchecked")告诉编译器忽略 unchecked 警告信息,如使用 list ArrayList等未进行参数化产生的警告信息@SuppressWarnings("serial")如果编译器出现这样的警告信息: The serializable class WmailCalendar does not declare a static final serialVersionUID field of type long 使用这个注释将警告信息去掉。@SuppressWarnings("deprecation")如果使用了使用@Deprecated注释的方法,编译器将出现警告信息。使用这个注释将警告信息去掉。@SuppressWarnings("unchecked", "deprecation")告诉编译器同时忽略unchecked和deprecation的警告信息。@SuppressWarnings(value={"unchecked", "deprecation"})等同于@SuppressWarnings("unchecked", "deprecation")案例@Entity@Table(name = "S_PRODUCEINFO" )@Data@NoArgsConstructor@AllArgsConstructorpublic class ProduceInfoEntity { @Id @Column(name = "app_name", unique = true, length = 50) private String name; @Column(name = "status") @Enumerated(EnumType. STRING) private ProduceStatus status; @Column(name = "create_time", updatable = false) @Temporal(TemporalType. TIMESTAMP) @CreationTimestamp private Date createTime; @Column(name = "update_time") @Temporal(TemporalType. TIMESTAMP) @UpdateTimestamp private Date updateTime; |
@Enumerted(EnumType.TIME) 获取时分秒 HH:MM:SS
-------Mr.Ge提供以上资源
http://blog.csdn.net/sudiluo_java/article/details/51858978
新闻热点
疑难解答