springboot内嵌tomcat、jetty. web启动包spring-boot-starter-web自动加载所依赖包
spring boot 1.3.0提供了开发热部署spring-boot-devtools
eclipse插件 spring tool suite
spring boot 核心
@SpringBootApplication 启动注解 融合了@Configuration @EnableAutoConfiguration @ComponentScan
自动扫描@SpringBootApplication 所在类的同级包和下级包
在 application.propertity 配置端口server.port=8080 server.context-path=/ 上下文可以去掉项目名
spring boot 提倡零配置如需要配置可以通过@ImportResource ({"classpath:some.xml", "classpath:we.xml"})
java -jar xx.jar
@Value {"${book.key}"}注入propertity文件值
@ConfigurationProperties 将propertity属性和bean关联起来例@ConfigurationProperties (prefix="author")指定前缀
@RestController 支持String map list返回值
@EnableConfigurationProperties使@ConfigurationProperties 配置属性bean生效
http转向https
TomcatEmbeddedServletContainerFactory 增加Connector
favicon.ico放到类路径下
JPA层
@Entity @NamedQuery
@Query 在方法上定义查询语句
@Modifying 更新
jpa提供Critera查询
排序 Sort 分页 Page PageRequest
resp
@Repository 标记dao层
@entity 标记M层 @data不用写get set
@service
@component