Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Spring4
In
TNG-CMS
Spring4 in TNG-CMS
• Spring Boot
• Spring Data JPA
• Spring Data REST
• Spring security
• Spring MVC
• …
Spring Boot
Spring Boot
• just run “java –jar …”
• embedded servers
• Jar or War
• Databases
• H2database(memdb)
• Hibernate 
• Spring...
Spring Boot
• externalized configuration
• command line properties (--server.port=9000)
• Application property files (/con...
Spring Boot - Actuator
ID Description Sensitive
autoconfig Displays an auto-configuration report showing all auto-
configu...
Spring Data JPA
Spring Data JPA
• CRUD Repository
• @NoRepositoryBean
• Query methods
• Property expressions
• (List<Person> findByAddress...
Spring Data REST
Spring Data REST
• REST web services
• GET/POST/PUT/DELETE
• hypermedia driven way
• Paging and Sorting
• http://localhost...
Spring Security
Spring Security
• Authentication
• User/authority
• User/group/authority
• ACL
• Authorization
• Form Login
• Authorize Re...
Spring Security
• JDBC Authentication
• JdbcDaoImpl
• Security Database Schema
• Remember-Me Authentication
• Password Enc...
Appendix
• Gradle
Why gradle
Gradle combines the best features from other build tools
Why gradle
Comparing build script size and readability between Maven and
Gradle
Why gradle
Gradle's Compelling Feature Set
Why gradle
• Expressive Build Language and Deep API
Build scripts apply the
Gradle DSL and have
access to its deep API.
Why gradle
• Flexible Conventions
In Gradle, Java projects are build by convention with sensible
defaults. Changing the de...
Why gradle
• Integration with Other Build Tools
Gradle provides deep integration with other build tools and
opens the door...
Why gradle
• Automating Your Project from Build to Deployment
Stages of a deployment pipeline.
Tasks performed in stages o...
Q&A
Many Thanks!
Spring4 in tng cms
Upcoming SlideShare
Loading in …5
×

Spring4 in tng cms

266 views

Published on

spring boot/spring data/spring security in tng_cms

Published in: Software
  • Be the first to comment

  • Be the first to like this

Spring4 in tng cms

  1. 1. Spring4 In TNG-CMS
  2. 2. Spring4 in TNG-CMS • Spring Boot • Spring Data JPA • Spring Data REST • Spring security • Spring MVC • …
  3. 3. Spring Boot
  4. 4. Spring Boot • just run “java –jar …” • embedded servers • Jar or War • Databases • H2database(memdb) • Hibernate  • Spring Data JPA • Spring ORMs • No XML • Java configure • Annotation • Autoconfig • Hot swapping • Reload static content(html, css, javascript) • Reload templates (Thymeleaf , FreeMarker, Velocity) • Reload Java classes(spring bean)
  5. 5. Spring Boot • externalized configuration • command line properties (--server.port=9000) • Application property files (/config) • yml • Dependencies management (spring-boot-dependencies) • Logging • Security • Messaging(JMS) • Mail(javaMail) • Transaction • Actuator • Metrics • health checks
  6. 6. Spring Boot - Actuator ID Description Sensitive autoconfig Displays an auto-configuration report showing all auto- configuration candidates and the reason why they ‘were’ or ‘were not’ applied. true beans Displays a complete list of all the Spring beans in your application. true configprops Displays a collated list of all @ConfigurationProperties. true dump Performs a thread dump. true env Exposes properties from Spring’s ConfigurableEnvironment. true health Shows application health information (a simple ‘status’ when accessed over an unauthenticated connection or full message details when authenticated). false info Displays arbitrary application info. false metrics Shows ‘metrics’ information for the current application. true mappings Displays a collated list of all @RequestMapping paths. true shutdown Allows the application to be gracefully shutdown (not enabled by default). true trace Displays trace information (by default the last few HTTP requests). true
  7. 7. Spring Data JPA
  8. 8. Spring Data JPA • CRUD Repository • @NoRepositoryBean • Query methods • Property expressions • (List<Person> findByAddressZipCode(ZipCode zipCode);) • Paging And Sorting • Limiting query results • Auditing • Annotation based auditing metadata • @CreatedBy, @LastModifiedBy, @CreatedDate and @LastModifiedDate • Interface-based auditing metadata
  9. 9. Spring Data REST
  10. 10. Spring Data REST • REST web services • GET/POST/PUT/DELETE • hypermedia driven way • Paging and Sorting • http://localhost:8080/persons?page=1&size=5 • http://localhost:8080/people/search/nameStartsWith?name=K&sort=name,desc • Projections and Excerpts • Hiding repository CRUD methods • @RestResource(exported = false)
  11. 11. Spring Security
  12. 12. Spring Security • Authentication • User/authority • User/group/authority • ACL • Authorization • Form Login • Authorize Requests • Method Security • ACL • HTTP/HTTPS
  13. 13. Spring Security • JDBC Authentication • JdbcDaoImpl • Security Database Schema • Remember-Me Authentication • Password Encoder • Cross Site Request Forgery (CSRF) • Spring security with AngularJS • Ip White list • spring-security-taglibs • Thymeleaf • thymeleaf-extras-springsecurity4
  14. 14. Appendix • Gradle
  15. 15. Why gradle Gradle combines the best features from other build tools
  16. 16. Why gradle Comparing build script size and readability between Maven and Gradle
  17. 17. Why gradle Gradle's Compelling Feature Set
  18. 18. Why gradle • Expressive Build Language and Deep API Build scripts apply the Gradle DSL and have access to its deep API.
  19. 19. Why gradle • Flexible Conventions In Gradle, Java projects are build by convention with sensible defaults. Changing the defaults is easy and achieved through convention properties.
  20. 20. Why gradle • Integration with Other Build Tools Gradle provides deep integration with other build tools and opens the door to gradually migrate your existing Ant or Maven build.
  21. 21. Why gradle • Automating Your Project from Build to Deployment Stages of a deployment pipeline. Tasks performed in stages of build pipeline
  22. 22. Q&A
  23. 23. Many Thanks!

×