Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ About professional me B. Sc. Degree from Computer Engineering, Middle East Technical University, Ankara, 1999 15 years experience with Java 10 years experience with Spring Started and contirbuted project http://www.gwt-openlayers.org/ Enterprise application architecture Working @Turkcell for 10 years In organization Advanced Spring Framework trainer In the project, software architect and developer
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Agenda Spring Boot Spring Data Spring Amqp Elastic Search Openstack App Demo
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Mobile Cloud Middleware
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Personal Cloud Solution Architecture Clients API LAYER Frontend Storage Elastic Search file metadata index token cache Oracle DB account subscription file system structure file metadata sharing metadata Openstack keystone swift file binary data upload / downoad Social / Cloud Backend Backend Services Legacy Enterprise Backend Systems Rabbit MQ
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Before Spring Boot – hard work on dependency management …. …. many others
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ After Spring Boot – less work on dependency management
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ After Spring Boot – still have all the jars …. …. many others
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ So easy to start & debug a web app
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ & Expose a Rest service
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ & Expose a SOAP Web service
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Deploy on a web app container
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Auto configuring properties application.properties # Spring Profiles # =============== spring.profiles.active=test, apiservice, backend # Global properties ... application-apiservice.properties # apiservice related properties # =============== api.service.url=http://... # other properties ... application-backend.properties # backend related properties # =============== backend.service.url=http://... # other properties ...
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring environmental differences – DEV
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Configuring environmental differences – TEST & PROD
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @Scheduled, @Async
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ @Scheduled, @Async
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ In the beginning – all work done by developers
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring killed the pain a bit – obtained & released resources
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Got better with JPA & Hibernate, but still coded by developers
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Finally, «no code no bug»
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ All you need is javax.persistence @Entity /** * @author Oliver Gierke */ @Entity public class Customer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String firstname; private String lastname; @JsonIgnore @OneToMany(mappedBy="customer") private Set<Account> accounts = new HashSet<Account>();
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Still plain old Sql, but not coded, auto generated, time saving select customer0_.id as id1_1_, customer0_.firstname as firstnam2_1_, customer0_.lastname as lastname3_1_ from customer customer0_ where (customer0_.firstname like ?) and upper(customer0_.lastname)=upper(?) public List<Customer> findByFirstnameLikeAndLastnameIgnoreCase( String firstname, String lastname);
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Custom, native, modifying queries
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP – RabbitMQ Configuration
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP – Consumer Configuration
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP – Message listener
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring AMQP – Message producer
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Spring summary Spring Boot : the parent of everything, auto configuration Spring Web : Restful APIs, @RestTemplate Spring Data JPA : Repositories, custom, native, modifying queries Spring Security Spring Social : sharing on Twitter, Facebook Spring Web Services : client & server Spring AMQP @Async, @Scheduled, @Transactional @Bean Java config No XML config or web.xml at all
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – index a document index type id source
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – get a document
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – Integrate with Spring App Context
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – Index a document
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – Search documents
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Elastic Search – Delete user documents
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack - Modules
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – Keystone authentication API
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – Authentication from Spring
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – Account creation from Spring
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – User creation from Spring
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – File upload from Spring https://{swift_url}/v1/AUTH_049037f79ea24214b2778830c96fd243/CONTAINER_MAIN/ 3b841cd9-547b-432a-98d9-3ce6211bab4f project_id container_name file_path
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ Openstack – File download from Spring
Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by-nc/3.0/ The Team Volkan Esgel – Security master Hüseyin Özcan – The UI man Erdem Günay – it’s me Kemal Yılmaz – the manager of the team