Spring Data JPA Simple Example

Size: px
Start display at page:

Download "Spring Data JPA Simple Example"

Transcription

1 Spring Data JPA Simple Example Spring Boot, WEB MVC, Spring Data JPA, Maria DB 를이용하여간단히예제를만들어보자. 프로젝트생성 마리아 DB 설치는아래 URL 참조 STS 에서 File -> New Project -> Spring Starter Project 다음화면에서 Data -> JPA, DataBase -> MySQL, WEB -> Web 선택

2 src/main/resources/application.properties spring.datasource.platform=mysql spring.datasource.sql-script-encoding=utf-8 spring.datasource.url=jdbc:mysql://localhost/jpa_emp?createdatabaseifnotexist=true spring.datasource.username=root spring.datasource.password=1111 spring.datasource.driver-class-name=com.mysql.jdbc.driver spring.datasource.test-on-borrow=true spring.jpa.show-sql=true # 엔티티클래스를기반으로테이블을자동갱신 / 생성하도록 spring.jpa.hibernate.ddl-auto=update logging.level.jpa=debug spring.mvc.view.prefix=/web-inf/views/ spring.mvc.view.suffix=.jsp 도메인클래스 (Emp.java) 테이블구조와동일하다. package jpa.domain; import javax.persistence.entity; import javax.persistence.generatedvalue; import public class private Integer empno; private String ename; public Emp() { public Emp(String ename) { this.ename = ename; public Integer getempno() { return empno; public void setempno(integer empno) { this.empno = empno; public String getename() { return ename; public void setename(string ename) { this.ename = ename; 레포지토리클래스 (EmpRepository.java)

3 package jpa.repository; import org.springframework.data.jpa.repository.jparepository; //JpaRepository를상속받으며매개변수로도메인클래스와키타입을기술한다. public interface EmpRepository extends JpaRepository<Emp, Integer> { 서비스인터페이스및구현클래스 (EmpService.java, EmpServiceImpl.java) package jpa.service; import java.util.list; public interface EmpService { Emp save(emp e); void delete(integer empno); Emp getemp(integer empno); List<Emp> getallemp(); package jpa.service; import java.util.list; import org.springframework.beans.factory.annotation.autowired; import org.springframework.stereotype.service; import public class EmpServiceImpl implements EmpService EmpRepository emprepository; public Emp save(emp e) { return emprepository.save(e); public void delete(integer empno) { emprepository.delete(empno);

4 public Emp getemp(integer empno) { return emprepository.findone(empno); public List<Emp> getallemp() { return emprepository.findall(); 컨트롤러클래스 (EmpController.java) package jpa.controller; import java.util.list; import org.springframework.beans.factory.annotation.autowired; import org.springframework.web.bind.annotation.pathvariable; import org.springframework.web.bind.annotation.requestmapping; import org.springframework.web.bind.annotation.requestmethod; import org.springframework.web.bind.annotation.restcontroller; public class EmpController EmpService empservice; // = "/get/{empno", method = RequestMethod.GET) public Emp get(@pathvariable Integer empno) { return empservice.getemp(empno); // = "/save", method = RequestMethod.GET) public Emp add(emp emp) { return empservice.save(emp);

5 // = "/save/{ename", method = RequestMethod.GET) public Emp add2(@pathvariable String ename) { return empservice.save(new Emp(ename)); // = "/delete/{empno", method = RequestMethod.GET) public void delete(@pathvariable Integer empno) { empservice.delete(empno); // = "/getall", method = RequestMethod.GET) public List<Emp> getall() { return empservice.getallemp(); 스프링부트메인클래스 (SpringJpaExamApplication.java) package jpa; import org.springframework.beans.factory.annotation.autowired; import org.springframework.boot.commandlinerunner; import org.springframework.boot.springapplication; import org.springframework.boot.autoconfigure.springbootapplication; import public class SpringjpaexamApplication implements CommandLineRunner { public static void main(string[] args) { SpringApplication.run(SpringjpaexamApplication.class, EmpService empservice;

6 // 초기데이터생성 public void run(string...args) { empservice.save(new Emp(" 가길동 ")); empservice.save(new Emp(" 나길동 ")); empservice.save(new Emp(" 다길동 "));

Spring Data JPA, QueryDSL 실습 JPAQueryFactory 이용

Spring Data JPA, QueryDSL 실습 JPAQueryFactory 이용 Spring Data JPA, QueryDSL 실습 JPAQueryFactory 이용 이전예제의 QueryDSL 작성부분만 JPAQueryFactory 를사용하여구현해보자. 다른점은 JPAQueryFactory 인스턴스생성을위해스프링부트메인에 @Bean 으로정의한부분과 EmpRepositoryImpl 의쿼리작성부분이조금다르고 groupby 처리메소드가추가되었다.

More information

N : 1 양방향관계, 저장, 검색, 삭제실습

N : 1 양방향관계, 저장, 검색, 삭제실습 N : 1 양방향관계, 저장, 검색, 삭제실습 http://ojc.asia, http://ojcedu.com 스프링부트, 마리아 DB 를사용하여 N:1 관계양방향예제를작성해보자. http://ojc.asia/bbs/board.php?bo_table=lecspring&wr_id=524 ( 마리아 DB 설치는위 URL 에서참조 ) STS -> Spring Starter

More information

Integrating Spring Boot with MySQL

Integrating Spring Boot with MySQL Integrating Spring Boot with MySQL Introduction For this course we will be using MySQL as the database for permanent data storage. We will use Java Persistence API (JPA) as an Object Relation Map (ORM)

More information

[ 스프링자바교육 ]Spring WEB MVC/JDBC( 오라클 EMP 테이블리스트 ),MyBatis,Spring JDBC,Spring WEB MVC 예제

[ 스프링자바교육 ]Spring WEB MVC/JDBC( 오라클 EMP 테이블리스트 ),MyBatis,Spring JDBC,Spring WEB MVC 예제 [ 스프링자바교육 ]Spring WEB MVC/JDBC( 오라클 EMP 테이블리스트 ),MyBatis,Spring JDBC,Spring WEB MVC 예제 Spring MVC 템플릿을간단히수정하여오라클의 scott 계정의 EMP 테이블의내용을 Spring MVC, Spring JDBC, MyBatis 를이용하여간단히출력해보자. 간단히 springemp 라는

More information

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기.

Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 게시판리스트보기. Spring Data JPA, Spring Boot, Oracle, AngulerJS 적용게시판실습 http://ojc.asia, http://ojcedu.com 게시판리스트보기 Spring JDBC 또는 MyBatis로만들때보다쉽고빠르게작성할수있다. 스프링컨트롤러는 RestController를적용했으며, 뷰페이지에 Bootstrap 및 AngulerJS 적용했다.

More information

Session 24. Spring Framework Introduction. Reading & Reference. dev.to/lechatthecat/how-to-use-spring-boot-java-web-framework-withintellij-idea-202p

Session 24. Spring Framework Introduction. Reading & Reference. dev.to/lechatthecat/how-to-use-spring-boot-java-web-framework-withintellij-idea-202p Session 24 Spring Framework Introduction 1 Reading & Reference Reading dev.to/lechatthecat/how-to-use-spring-boot-java-web-framework-withintellij-idea-202p http://engineering.pivotal.io/post/must-know-spring-boot-annotationscontrollers/

More information

SAP S/4HANA CLOUD SDK: EXTEND YOUR CLOUD FOUNDRY APPLICATION WITH TENANT-AWARE PERSISTENCY

SAP S/4HANA CLOUD SDK: EXTEND YOUR CLOUD FOUNDRY APPLICATION WITH TENANT-AWARE PERSISTENCY SAP S/4HANA CLOUD SDK: EXTEND YOUR CLOUD FOUNDRY APPLICATION WITH TENANT-AWARE PERSISTENCY DECEMBER 21, 2017 KAUSTUBH SATPUTE LEAVE A COMMENT EDIT S/4HANA Cloud SDK When you build a side-by-side extension

More information

JPA - ENTITY MANAGERS

JPA - ENTITY MANAGERS JPA - ENTITY MANAGERS http://www.tutorialspoint.com/jpa/jpa_entity_managers.htm Copyright tutorialspoint.com This chapter takes you through simple example with JPA. Let us consider employee management

More information

Deployment to the Cloud

Deployment to the Cloud Appendix A Deployment to the Cloud Over the last couple of years the cloud has grown considerably and a lot of companies offer different cloud solutions, such as Platform as a Service Infrastructure as

More information

Master the most popular Java framework in six easy levels!

Master the most popular Java framework in six easy levels! Spring Master Class - Course Guide Master the most popular Java framework in six easy levels! Table of Contents 1. Congratulations 2. About in28minutes 3. Troubleshooting Guide 4. Getting Started 5. Spring

More information

IN ACTION. Craig Walls SAMPLE CHAPTER. FOREWORD BY Andrew Glover MANNING

IN ACTION. Craig Walls SAMPLE CHAPTER. FOREWORD BY Andrew Glover MANNING IN ACTION Craig Walls FOREWORD BY Andrew Glover SAMPLE CHAPTER MANNING Spring Boot in Action by Craig Walls Chapter 2 Copyright 2016 Manning Publications brief content 1 Bootstarting Spring 1 2 Developing

More information

Tutorial Hibernate Annotaion Simple Book Library

Tutorial Hibernate Annotaion Simple Book Library Tutorial Hibernate Annotaion Simple Book Library 1. Create Java Project. 2. Add Hibernate Library. 3. Source Folder, create hibernate configuration file (hibernate.cfg.xml). Done. 4. Source Folder, create

More information

TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités. 1 Préparation de l environnement Eclipse

TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités. 1 Préparation de l environnement Eclipse TP 6 des architectures logicielles Séance 6 : Architecture n-tiers avec du JPA avec plusieurs entités 1 Préparation de l environnement Eclipse 1. Environment Used JDK 7 (Java SE 7) JPA 2.0 Eclipse MySQL

More information

Spring boot multipart response

Spring boot multipart response Spring boot multipart response Issuing the following request will render the image in a browser:. How can I get the horizon and the lighthouse both level in my photo?. First thing First! Let's configure

More information

Java Persistence API (JPA) Entities

Java Persistence API (JPA) Entities Java Persistence API (JPA) Entities JPA Entities JPA Entity is simple (POJO) Java class satisfying requirements of JavaBeans specification Setters and getters must conform to strict form Every entity must

More information

Session 25. Spring Controller. Reading & Reference

Session 25. Spring Controller. Reading & Reference Session 25 Spring Controller 1 Reading Reading & Reference www.tutorialspoint.com/spring/spring_web_mvc_framework.htm https://springframework.guru/spring-requestmapping-annotation/ Reference Spring home

More information

Exercise for OAuth2 security. Andreas Falk

Exercise for OAuth2 security. Andreas Falk Exercise for OAuth2 security Andreas Falk Table of Contents 1. What we will build....................................................................... 1 2. Step 1....................................................................................

More information

SPRING - EXCEPTION HANDLING EXAMPLE

SPRING - EXCEPTION HANDLING EXAMPLE SPRING - EXCEPTION HANDLING EXAMPLE http://www.tutorialspoint.com/spring/spring_exception_handling_example.htm Copyright tutorialspoint.com The following example show how to write a simple web based application

More information

Spring Professional v5.0 Exam

Spring Professional v5.0 Exam Spring Professional v5.0 Exam Spring Core Professional v5.0 Dumps Available Here at: /spring-exam/core-professional-v5.0- dumps.html Enrolling now you will get access to 250 questions in a unique set of

More information

Creating RESTful web services with Spring Boot

Creating RESTful web services with Spring Boot Creating RESTful web services with Spring Boot The Spring framework Free and open source Inversion of Control Container (IoC) Modules DI / AOP Data /Security Web MVC/ REST So much more +++ What is Spring

More information

Business Logic and Spring Framework

Business Logic and Spring Framework Business Logic and Spring Framework Petr Křemen petr.kremen@fel.cvut.cz Winter Term 2017 Petr Křemen (petr.kremen@fel.cvut.cz) Business Logic and Spring Framework Winter Term 2017 1 / 32 Contents 1 Business

More information

PUBLIC RabbitMQ Service SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN

PUBLIC RabbitMQ Service SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN PUBLIC 2017-10-26 2018 SAP SE or an SAP affiliate company. All rights reserved. THE BEST RUN Content 1 Overview.... 3 1.1 The RabbitMQ Cluster....3 1.2 Access the Service....5 1.3 Use the Service.... 5

More information

SAMPLE CHAPTER. John Carnell MANNING

SAMPLE CHAPTER. John Carnell MANNING SAMPLE CHAPTER John Carnell MANNING Spring Microservices in Action by John Carnell Sample Chapter 6 Copyright 2017 Manning Publications brief contents 1 Welcome to the cloud, Spring 1 2 Building microservices

More information

12 (15) Factor App Workshop

12 (15) Factor App Workshop 12 (15) Factor App Workshop http://bit.ly/15factor-uberconf-2018 Christopher M. Judd Christopher M. Judd CTO and Partner at leader 221 BROUGHT TO YOU IN PARTNERSHIP WITH Getting Started With Docker BY

More information

תוכנית יומית לכנס התכנסות וארוחת בוקר

תוכנית יומית לכנס התכנסות וארוחת בוקר תוכנית יומית לכנס התכנסות וארוחת בוקר 08:00-09:00 הרצאה הפסקה ראשונה הרצאה ארוחת צהריים הרצאה הפסקה מתוקה -09:00-10:30-10:30-10:45-10:45-12:30-12:30-13:30-13:30-15:00-15:00-15:15 הרצאה 15:15-16:30 לפרטים

More information

JPA - QUICK GUIDE JPA - INTRODUCTION

JPA - QUICK GUIDE JPA - INTRODUCTION http://www.tutorialspoint.com/jpa/jpa_quick_guide.htm JPA - QUICK GUIDE Copyright tutorialspoint.com JPA - INTRODUCTION Any enterprise application performs database operations by storing and retrieving

More information

WETSoDA Framework Information Based Java Software Architecture Recovery

WETSoDA Framework Information Based Java Software Architecture Recovery WETSoDA 2017 Framework Information Based Java Software Architecture Recovery Xiaocong Li, Li Zhang, Ning Ge Beihang University, Beijing, China 2017-12-04 OUTLINE Introduction Problem Statement Our Solution

More information

Java EE Architecture, Part Three. Java EE architecture, part three 1(69)

Java EE Architecture, Part Three. Java EE architecture, part three 1(69) Java EE Architecture, Part Three Java EE architecture, part three 1(69) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE

More information

Introduction to JPA. Fabio Falcinelli

Introduction to JPA. Fabio Falcinelli Introduction to JPA Fabio Falcinelli Me, myself and I Several years experience in active enterprise development I love to design and develop web and standalone applications using Python Java C JavaScript

More information

~$> whoami. Ioan Marius Curelariu SDE at Website Analytics Amazon Development Center Romania

~$> whoami. Ioan Marius Curelariu SDE at Website Analytics Amazon Development Center Romania MVC on the WEB ~$> whoami Ioan Marius Curelariu SDE at Website Analytics Amazon Development Center Romania The Server Side Story The Server Side Story Elastic Beanstalk The Spring Framework First described

More information

Testing Transactions BMT

Testing Transactions BMT Testing Transactions BMT Example testing-transactions-bmt can be browsed at https://github.com/apache/tomee/tree/master/examples/testing-transactions-bmt Shows how to begin, commit and rollback transactions

More information

Reactive Streams in the Web. Florian Stefan ebay Classifieds Group GOTO Berlin 2017

Reactive Streams in the Web. Florian Stefan ebay Classifieds Group GOTO Berlin 2017 Reactive Streams in the Web Florian Stefan ebay Classifieds Group GOTO Berlin 2017 Who am I? Florian Stefan mobile.de (ebay Classifieds Group) https://ebaytech.berlin/ fstefan@ebay.com @f_s_t_e_f_a_n https://github.com/florian-stefan/

More information

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable?

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable? Peer Instruction 8 Classes and Objects How can multiple methods within a Java class read and write the same variable? A. Allow one method to reference a local variable of the other B. Declare a variable

More information

Downloaded S. from Kiran, PGT (CS) KV, Malleswaram STRUCTURES. Downloaded from

Downloaded S. from Kiran,  PGT (CS) KV, Malleswaram STRUCTURES. Downloaded from Downloaded S. from Kiran, www.studiestoday.com PGT (CS) KV, STRUCTURES WHAT IS A STRUCTURE? Structure is a collection of logically related data. It is also a collection of dissimilar datatype. Downloaded

More information

SPRING CLOUD AGIM EMRULI - MIMACOM

SPRING CLOUD AGIM EMRULI - MIMACOM SPRING CLOUD AGIM EMRULI - MIMACOM AGIM EMRULI @AEMRULI AEMRULI AGIM.EMRULI@ MIMACOM.COM XD BOOT GRAILS CLOUD IO EXECUTION STREAMS, TAPS, JOBS FULL STACK, WEB SERVICE REGISTRY, CIRCUIT BREAKER, METRICS

More information

Introduction to Spring Framework: Hibernate, Spring MVC & REST

Introduction to Spring Framework: Hibernate, Spring MVC & REST Introduction to Spring Framework: Hibernate, Spring MVC & REST Training domain: Software Engineering Number of modules: 1 Duration of the training: 36 hours Sofia, 2017 Copyright 2003-2017 IPT Intellectual

More information

Cloud Computing Platform as a Service

Cloud Computing Platform as a Service HES-SO Master of Science in Engineering Cloud Computing Platform as a Service Academic year 2015/16 Platform as a Service Professional operation of an IT infrastructure Traditional deployment Server Storage

More information

Notes on Chapter Three

Notes on Chapter Three Notes on Chapter Three Methods 1. A Method is a named block of code that can be executed by using the method name. When the code in the method has completed it will return to the place it was called in

More information

SAMPLE CHAPTER. John Carnell MANNING

SAMPLE CHAPTER. John Carnell MANNING SAMPLE CHAPTER John Carnell MANNING Spring Microservices in Action by John Carnell Sample Chapter 1 Copyright 2017 Manning Publications brief contents 1 Welcome to the cloud, Spring 1 2 Building microservices

More information

Ray Tsang Developer Advocate Google Cloud Platform

Ray Tsang Developer Advocate Google Cloud Platform Ray Tsang Developer Advocate Google Cloud Platform @saturnism +RayTsang Ray Tsang Developer Architect Traveler Photographer flickr.com/saturnism Writing a Kubernetes Autoscaler Kubernetes API - In Depth

More information

What is Spring Cloud

What is Spring Cloud What is Spring Cloud 1 What is Spring Cloud Service Discovery (Eureka) API Gateway (Zuul) Config Server (Spring Config) Circuit Breaker (Hystrix, Turbine) Client Side Load-balancing (Ribbon) Distributed

More information

G l a r i m y TeachCode Series. Hibernate. Illustrated. Krishna Mohan Koyya

G l a r i m y TeachCode Series. Hibernate. Illustrated. Krishna Mohan Koyya G l a r i m y TeachCode Series Hibernate Illustrated Krishna Mohan Koyya Basic Mapping Entities with XML Person.java import java.util.date; public class Person { private int id; private String name; private

More information

Practice 2. SOAP & REST

Practice 2. SOAP & REST Enterprise System Integration Practice 2. SOAP & REST Prerequisites Practice 1. MySQL and JPA Introduction JAX-WS stands for Java API for XML Web Services. JAX-WS is a technology for building web services

More information

Week 5-1: ADT Design

Week 5-1: ADT Design Week 5-1: ADT Design Part1. ADT Design Define as class. Every obejects are allocated in heap space. Encapsulation : Data representation + Operation Information Hiding : Object's representation part hides,

More information

JVA-117E. Developing RESTful Services with Spring

JVA-117E. Developing RESTful Services with Spring JVA-117E. Developing RESTful Services with Spring Version 4.1 This course enables the experienced Java developer to use the Spring MVC framework to create RESTful web services. We begin by developing fluency

More information

REST AND AJAX. Introduction. Module 13

REST AND AJAX. Introduction. Module 13 Module 13 REST AND AJAX Introduction > Until now we have been building quite a classic web application: we send a request to the server, the server processes the request, and we render the result and show

More information

What s new in Spring? Craig

What s new in Spring? Craig What s new in Spring? Craig Walls craig@habuma.com Twitter: @habuma @springsocial http://github.com/habuma What s new? The Spring Ecosystem Compatibility Concerns Configuration Improvements REST WebSocket/STOMP

More information

D.A.V. PUBLIC SCHOOL, NEW PANVEL

D.A.V. PUBLIC SCHOOL, NEW PANVEL D.A.V. PUBLIC SCHOOL, NEW PANVEL Plot No. 267, 268, Sector-10, New Panvel, Navi Mumbai-410206 (Maharashtra). Phone 022-27451793, 27468211, Telefax- 27482276 Email- davschoolnp@vsnl.net / davnewpanvel@gmail.com,

More information

Introduction to Spring 5, Spring MVC and Spring REST

Introduction to Spring 5, Spring MVC and Spring REST Introduction to Spring 5, Spring MVC and Spring REST Duration: 5 Days US Price: $2795 UK Price: 1,995 *Prices are subject to VAT CA Price: CDN$3,275 *Prices are subject to GST/HST Delivery Options: Attend

More information

Installing MySQL. Hibernate: Setup, Use, and Mapping file. Setup Hibernate in IDE. Starting WAMP server. phpmyadmin web console

Installing MySQL. Hibernate: Setup, Use, and Mapping file. Setup Hibernate in IDE. Starting WAMP server. phpmyadmin web console Installing MySQL Hibernate: Setup, Use, and Mapping file B.Tech. (IT), Sem-6, Applied Design Patterns and Application Frameworks (ADPAF) Dharmsinh Desai University Prof. H B Prajapati Way 1 Install from

More information

Microservices mit Java, Spring Boot & Spring Cloud. Eberhard Wolff

Microservices mit Java, Spring Boot & Spring Cloud. Eberhard Wolff Microservices mit Java, Spring Boot & Spring Cloud Eberhard Wolff Fellow @ewolff What are Microservices? Micro Service: Definition > Small > Independent deployment units > i.e. processes or VMs > Any technology

More information

REST JPA IN JBOSSEAP 6.4

REST JPA IN JBOSSEAP 6.4 REST JPA IN JBOSSEAP 6.4 Tổ chức code phân tầng REST JPA DB Trong đó JPA gồm: entities và các lớp façade. Tạo entity đặc tả cho một cuốn sách package rest.jpa.entities; import javax.persistence.entity;

More information

Remote controlling Parrot AR Drone with Spring Boot & Vaadin. Peter expert & trainer

Remote controlling Parrot AR Drone with Spring Boot & Vaadin. Peter expert & trainer Remote controlling Parrot AR Drone with Spring Boot & Vaadin Peter Lehto @peter_lehto expert & trainer Vaadin & GWT Vaadin Spring Integration Spring Boot How to get started? QA Drone Server driven UI

More information

Webservice Inheritance

Webservice Inheritance Webservice Inheritance Example webservice-inheritance can be browsed at https://github.com/apache/tomee/tree/master/examples/webservice-inheritance Help us document this example! Click the blue pencil

More information

Injection Of Entitymanager

Injection Of Entitymanager Injection Of Entitymanager Example injection-of-entitymanager can be browsed at https://github.com/apache/tomee/tree/master/examples/injection-ofentitymanager This example shows use of @PersistenceContext

More information

JAVA SPRING BOOT REST WEB SERVICE INTEGRATION WITH JAVA ARTIFICIAL INTELLIGENCE WEKA FRAMEWORK

JAVA SPRING BOOT REST WEB SERVICE INTEGRATION WITH JAVA ARTIFICIAL INTELLIGENCE WEKA FRAMEWORK 2017 INTERNATIONAL SCIENTIFIC CONFERENCE 17-18 November 2017, GABROVO JAVA SPRING BOOT REST WEB SERVICE INTEGRATION WITH JAVA ARTIFICIAL INTELLIGENCE WEKA FRAMEWORK Željko Jovanović, Dijana Jagodić, Dejan

More information

Introduction to Spring Framework: Hibernate, Web MVC & REST

Introduction to Spring Framework: Hibernate, Web MVC & REST Introduction to Spring Framework: Hibernate, Web MVC & REST Course domain: Software Engineering Number of modules: 1 Duration of the course: 50 hours Sofia, 2017 Copyright 2003-2017 IPT Intellectual Products

More information

PHP. How Web Applications interact with server side databases CRUD. Connecting and using mysql from PHP PHP provides many mysql specific functions

PHP. How Web Applications interact with server side databases CRUD. Connecting and using mysql from PHP PHP provides many mysql specific functions PHP How Web Applications interact with server side databases CRUD Connecting and using mysql from PHP PHP provides many mysql specific functions mysql_connect mysql_select_db mysql_query mysql_fetch_array

More information

Spring Cloud, Spring Boot and Netflix OSS

Spring Cloud, Spring Boot and Netflix OSS Spring Cloud, Spring Boot and Netflix OSS Spencer Gibb twitter: @spencerbgibb email: sgibb@pivotal.io Dave Syer twitter: @david_syer email: dsyer@pivotal.io (Spring Boot and Netflix OSS or Spring Cloud

More information

Microservices Implementations not only with Java. Eberhard Wolff Fellow

Microservices Implementations not only with Java. Eberhard Wolff Fellow Microservices Implementations not only with Java Eberhard Wolff http://ewolff.com @ewolff Fellow http://continuous-delivery-buch.de/ http://continuous-delivery-book.com/ http://microservices-buch.de/ http://microservices-book.com/

More information

JPA. Java persistence API

JPA. Java persistence API JPA Java persistence API JPA Entity classes JPA Entity classes are user defined classes whose instances can be stored in a database. JPA Persistable Types The term persistable types refers to data types

More information

1. Go to the URL Click on JDK download option

1. Go to the URL   Click on JDK download option Download and installation of java 1. Go to the URL http://www.oracle.com/technetwork/java/javase/downloads/index.html Click on JDK download option 2. Select the java as per your system type (32 bit/ 64

More information

Majustic - Evaluation Test With Answers. Time: 1 hour 30 minutes

Majustic - Evaluation Test With Answers. Time: 1 hour 30 minutes Majustic - Evaluation Test With Answers Time: 1 hour 30 minutes Version 1.0, 04/07/2015 Summary 1. JAVA Questions.............................................................................. 1 1.1. Consider

More information

Tools for Accessing REST APIs

Tools for Accessing REST APIs APPENDIX A Tools for Accessing REST APIs When you have to work in an agile development environment, you need to be able to quickly test your API. In this appendix, you will learn about open source REST

More information

Appendix F A Simpler Sample Built with Spring, Hibernate, MySQL and Maven 3

Appendix F A Simpler Sample Built with Spring, Hibernate, MySQL and Maven 3 Appendix F A Simpler Sample Built with Spring, Hibernate, MySQL and Maven 3 In this Appendix, I show you how to build a generic enterprise Web application with Maven 3. Compared with SOBA, this is a lighter-weight,

More information

JPA Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule

JPA Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule Berner Fachhochschule Technik und Informatik JPA Entities Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content Characteristics of entities Programming

More information

FreeMarker in Spring Web. Marin Kalapać

FreeMarker in Spring Web. Marin Kalapać FreeMarker in Spring Web Marin Kalapać Agenda Spring MVC view resolving in general FreeMarker what is it and basics Configure Spring MVC to use Freemarker as view engine instead of jsp Commonly used components

More information

Composite Pattern - Shapes Example - Java Sourcecode

Composite Pattern - Shapes Example - Java Sourcecode Composite Pattern - Shapes Example - Java Sourcecode In graphics editors a shape can be basic or complex. An example of a simple shape is a line, where a complex shape is a rectangle which is made of four

More information

UNIVERSIDAD TÉCNICA DEL NORTE

UNIVERSIDAD TÉCNICA DEL NORTE UNIVERSIDAD TÉCNICA DEL NORTE Facultad de Ingeniería en Ciencias Aplicadas Carrera de Ingeniería en Sistemas Informáticos Computacionales TRABAJO DE GRADO PREVIO A LA OBTENCIÓN DEL TÍTULO DE INGENÍERA

More information

Model Driven Architecture with Java

Model Driven Architecture with Java Model Driven Architecture with Java Gregory Cranz Solutions Architect Arrow Electronics, Inc. V20061005.1351 Page Number.1 Who am I? Solutions Architect Software Developer Java Early Adopter Page Number.2

More information

Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics:

Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics: Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics: EJB 3 entities Java persistence API Mapping an entity to a database table

More information

CON 2013., : 본자료를무단배포하지말아주세요.

CON 2013., : 본자료를무단배포하지말아주세요. DDD @JCO CON 2013, : @madvirus, : madvirus@madvirus.net 1 / 2 3 TOC DDD DDD DDD ORM DDD ORM UI ( ) 4 5? 6 : public getter/setter (Association) 7 public class Employee { private String name; private Organization

More information

Spring Data Commons - Reference Documentation

Spring Data Commons - Reference Documentation Spring Data Commons - Reference Documentation Oliver Gierke, Thomas Darimont, Christoph Strobl, Mark Pollack, Thomas Risberg Version 1.9.2.RELEASE 2015-01-28 Table of Contents Preface... 1 1. Project metadata...

More information

2018/2/5 话费券企业客户接入文档 语雀

2018/2/5 话费券企业客户接入文档 语雀 1 2 2 1 2 1 1 138999999999 2 1 2 https:lark.alipay.com/kaidi.hwf/hsz6gg/ppesyh#2.4-%e4%bc%81%e4%b8%9a%e5%ae%a2%e6%88%b7%e6%8e%a5%e6%94%b6%e5%85%85%e5 1/8 2 1 3 static IAcsClient client = null; public static

More information

Objectives: Lab Exercise 1 Part 1. Sample Run. Part 2

Objectives: Lab Exercise 1 Part 1. Sample Run. Part 2 Objectives: king Saud University College of Computer &Information Science CSC111 Lab Object I All Sections - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

More information

University of Palestine. Mid Exam Total Grade: 100

University of Palestine. Mid Exam Total Grade: 100 First Question No. of Branches (5) A) Choose the correct answer: 1. If we type: system.out.println( a ); in the main() method, what will be the result? int a=12; //in the global space... void f() { int

More information

1.00 Introduction to Computers and Engineering Problem Solving. Quiz 1 March 7, 2003

1.00 Introduction to Computers and Engineering Problem Solving. Quiz 1 March 7, 2003 1.00 Introduction to Computers and Engineering Problem Solving Quiz 1 March 7, 2003 Name: Email Address: TA: Section: You have 90 minutes to complete this exam. For coding questions, you do not need to

More information

MTAT Enterprise System Integration

MTAT Enterprise System Integration MTAT.03.229 Enterprise System Integration Lecture 7: Hypermedia REST Luciano García-Bañuelos University of Tartu Richardson s Maturity Level 2 Also known as CRUD services Mul5ple URIs, mul5ple HTTP verbs,

More information

A Lightweight Java Container

A Lightweight Java Container Introducing Spring A Lightweight Java Container Sample Content garth@ggilmour.com Introducing Spring Spring was born from dislike of JEE JEE can be viewed as cumbersome, awkward and intrusive Especially

More information

Developing Spring based WebSphere Portal application using IBM Rational Application Developer

Developing Spring based WebSphere Portal application using IBM Rational Application Developer Developing Spring based WebSphere Portal application using IBM Rational Application Developer Table of Content Abstract...3 Overview...3 Sample Use case...3 Prerequisite :...3 Developing the spring portlet...4

More information

Design Patterns. Vasileios Theodorou

Design Patterns. Vasileios Theodorou Design Patterns Vasileios Theodorou 1 A partitioning structural design pattern Motivation - Treat individual objects and compositions of objects uniformly Application - Objects are recursively composed

More information

Unit 6 Hibernate. List the advantages of hibernate over JDBC

Unit 6 Hibernate. List the advantages of hibernate over JDBC Q1. What is Hibernate? List the advantages of hibernate over JDBC. Ans. Hibernate is used convert object data in JAVA to relational database tables. It is an open source Object-Relational Mapping (ORM)

More information

SQL Structured Query Language Introduction

SQL Structured Query Language Introduction SQL Structured Query Language Introduction Rifat Shahriyar Dept of CSE, BUET Tables In relational database systems data are represented using tables (relations). A query issued against the database also

More information

Chapter-6 Classes and Objects. stud.execute(); getch();} Output:

Chapter-6 Classes and Objects. stud.execute(); getch();} Output: Chapter-6 Classes and Objects Examples: 1.Specifying a class: class student char name[30]; int rollno,mark1,mark2,total_marks; void accept() cout>name>>rollno>>mark1>>mark2;

More information

Getting Started with the Bullhorn SOAP API and Java

Getting Started with the Bullhorn SOAP API and Java Getting Started with the Bullhorn SOAP API and Java Introduction This article is targeted at developers who want to do custom development using the Bullhorn SOAP API and Java. You will create a sample

More information

Objectives. After completing this lesson, you should be able to do the following:

Objectives. After completing this lesson, you should be able to do the following: Objectives After completing this lesson, you should be able to do the following: Write SELECT statements to access data from more than one table using equality and nonequality joins View data that generally

More information

Spring-beans-2.5.xsd' Must Have Even Number Of Uri's

Spring-beans-2.5.xsd' Must Have Even Number Of Uri's Spring-beans-2.5.xsd' Must Have Even Number Of Uri's encoding="utf-8"? beans xmlns="springframework.org/schema/beans" spring. schemalocation must have even number of URI's. How can I validate a form collection

More information

OSGi and Spring Data for simple (Web) Application Development

OSGi and Spring Data for simple (Web) Application Development OSGi and Spring Data for simple (Web) Application Development Christian Baranowski Content of my talk in a sentence Java development with Bndtools and bnd is so much fun! My Talk in three Words - Bndtools

More information

Four times Microservices: REST, Kubernetes, UI Integration, Async. Eberhard Fellow

Four times Microservices: REST, Kubernetes, UI Integration, Async. Eberhard  Fellow Four times Microservices: REST, Kubernetes, UI Integration, Async Eberhard Wolff @ewolff http://ewolff.com Fellow http://continuous-delivery-buch.de/ http://continuous-delivery-book.com/ http://microservices-buch.de/

More information

Database Programming Overview. COSC 304 Introduction to Database Systems. Database Programming. JDBC Interfaces. JDBC Overview

Database Programming Overview. COSC 304 Introduction to Database Systems. Database Programming. JDBC Interfaces. JDBC Overview COSC 304 Introduction to Database Systems Database Programming Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Database Programming Overview Most user interaction with

More information

This exam is open book. Each question is worth 3 points.

This exam is open book. Each question is worth 3 points. This exam is open book. Each question is worth 3 points. Page 1 / 15 Page 2 / 15 Page 3 / 12 Page 4 / 18 Page 5 / 15 Page 6 / 9 Page 7 / 12 Page 8 / 6 Total / 100 (maximum is 102) 1. Are you in CS101 or

More information

Extracts from Intro to Db - Jdbc - JPA SpringData

Extracts from Intro to Db - Jdbc - JPA SpringData arnaud.nauwynck@gmail.com Extracts from Intro to Db - Jdbc - JPA SpringData This document: http://arnaud-nauwynck.github.io/docs/introcodeextract-db-jdbc-jpa-springdata.pdf SOURCE Document : http://arnaud-nauwynck.github.io/docs/

More information

Table of Contents

Table of Contents Table of Contents Introduction Architecture Graph Dependencies PostgreSQL Database Setup Structure in Eclipse Entity Class DAO Layer Service Layer Presentation Layer PhoneContoller JSP Web Configuration

More information

Fall CS 101: Test 2 Name UVA ID. Grading. Page 1 / 4. Page3 / 20. Page 4 / 13. Page 5 / 10. Page 6 / 26. Page 7 / 17.

Fall CS 101: Test 2 Name UVA  ID. Grading. Page 1 / 4. Page3 / 20. Page 4 / 13. Page 5 / 10. Page 6 / 26. Page 7 / 17. Grading Page 1 / 4 Page3 / 20 Page 4 / 13 Page 5 / 10 Page 6 / 26 Page 7 / 17 Page 8 / 10 Total / 100 1. (4 points) What is your course section? CS 101 CS 101E Pledged Page 1 of 8 Pledged The following

More information

Spring Data MongoDB - Reference Documentation

Spring Data MongoDB - Reference Documentation Mark Pollack, Thomas Risberg, Oliver Gierke, Costin Leau, Jon Brisbin, Thomas Darimont, Christoph Strobl Copyright 2008-2014 The original authors. Copies of this document may be made for your own use and

More information

Interfaces & Generics

Interfaces & Generics Interfaces & Generics CSC207 Winter 2018 The Programming Interface The "user" for almost all code is a programmer. That user wants to know:... what kinds of object your class represents... what actions

More information

Spring Persistence. with Hibernate PAUL TEPPER FISHER BRIAN D. MURPHY

Spring Persistence. with Hibernate PAUL TEPPER FISHER BRIAN D. MURPHY Spring Persistence with Hibernate PAUL TEPPER FISHER BRIAN D. MURPHY About the Authors About the Technical Reviewer Acknowledgments xii xiis xiv Preface xv Chapter 1: Architecting Your Application with

More information

ADDING GEOSPATIAL FEATURES TO A JAVA WEB APP CODEONE 2018

ADDING GEOSPATIAL FEATURES TO A JAVA WEB APP CODEONE 2018 ADDING GEOSPATIAL FEATURES TO A JAVA WEB APP CODEONE 2018 Matti Tahvonen OS S A DVO CAT E Web pages from 1994 Web apps from 1996 (JavaScript, Perl, PHP ) Java web apps from 2006 (Vaadin R&D + helping our

More information

Application Design and Development: October 30

Application Design and Development: October 30 M149: Database Systems Winter 2018 Lecturer: Panagiotis Liakos Application Design and Development: October 30 1 Applications Programs and User Interfaces very few people use a query language to interact

More information

PostgreSQL and REST API s The Easy Way

PostgreSQL and REST API s The Easy Way Migration and Developer Productivity Solutions PostgreSQL and REST API s The Easy Way Charles Finley, Transformix Computer Corporation http://modernization.xformix.com/resources/articles/ 1 PostgresOpen

More information