-
Notifications
You must be signed in to change notification settings - Fork 0
Spring
wangb edited this page Oct 31, 2018
·
1 revision
- Bean
- Configuration: provide beans
- Autowire: auto create beans depend on
- Component scan: auto discover component create as bean.
- Autoconfiguartion: spring boot can determine what component need to be configured and wired together.
- @SpringBootApplication
- @SpringBootConfiguration
- @EnableAutoConfiguration
- @ComponentScan: @Component, @Controller, @Service
- core container
- dependency injectionframework.
- spring data: JPA
- security
- RequestMapping, GetMapping etc
- Model: is an object that ferries data between a controller and whatever view is charged with rendering that data.
- PostMapping
- @Valid and Errors // kotlin need @filed or @get before annotations
- WebMvcConfigurer: shortcut for view without model
- /resources/schema.sql will be execute automaticlly create schema, /resources/data.sql automaticlly create data
- JdbcTemplate: query
- Model: data class
- ModelRepository: query one and all, save
- @Repository JdbcModelRepository:
- @Entity data class Model
- @Id, @ManyToMany etc
- @NotNull validation annotation
- CrudRepository: automaticlly implemetion
- alt: shiro
- auto configuration
- WebSecurityConfigurerAdapter: add login form
- User store: override configure
- in-memory: testing
- JDBC
- LDAP
- custom services
- authentication
- User: UserDetails
- getAuthorities
- environment abstraction
- RestContorller
- @PathVariable: url param
- @RequestBody: body param
- RestTemplate: sync
- WebClient: async