Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Intro to Spring Boot Eddú Meléndez Gonzales @EdduMelendez
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ About Me • Java Software Engineer • Open Source Contributor (spring- boot, spring-session, spring-security, spring-ldap, arquillian-cube, mybatis- spring-boot-starter) • Blogger 2
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Ecosystem 4 Spring Framework Spring Security Spring Data Spring Batch Spring Integration Spring AMQP Spring Hateoas Spring Mobile Spring Social Spring Web Services
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Java Config 8 @Bean public DataSource dataSource() { org.apache.tomcat.jdbc.pool.DataSource dataSource = new org.apache.tomcat.jdbc.pool.DataSource(); dataSource.setUsername("sa"); dataSource.setPassword("password"); dataSource.setUrl("jdbc:h2:tcp://dbserver/~/test"); dataSource.setDriverClassName("org.h2.Driver"); return dataSource; }
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring Boot’s configuration 9 spring.datasource.username=sa spring.datasource.password=password spring.datasource.url=jdbc:h2:tcp://dbserver/~/test #spring.datasource.driver-class-name=org.h2.Driver
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Why Spring Boot? • Convention over Configuration • Provide dependency management • Auto-configuration • Starter dependencies • Actuator 10
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ New in Spring Boot 1.4 • Spring Framework 4.3.2 • Apache Tomcat 8.5.4 • Caffeine caching support • More Spring Session backend supports • Couchbase and Neo4j auto-configuration support • Thymeleaf 2.x and 3.x compatibility • Test improvements 12
Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Learn More. Stay Connected. Don’t miss Testing Spring Boot Applications by Phil Webb Writing Your Own Spring Boot Starter by Dieter Hubau @springcentral spring.io/blog @pivotal pivotal.io/blog @pivotalcf http://engineering.pivotal.io