diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/compiler.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/compiler.xml new file mode 100644 index 0000000..e504349 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/compiler.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/encodings.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/encodings.xml new file mode 100644 index 0000000..b26911b --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/misc.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/misc.xml new file mode 100644 index 0000000..3bc1190 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/misc.xml @@ -0,0 +1,15 @@ + + + + + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/uiDesigner.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/uiDesigner.xml new file mode 100644 index 0000000..e96534f --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/vcs.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/.idea/workspace.xml b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/workspace.xml new file mode 100644 index 0000000..c97013d --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/.idea/workspace.xml @@ -0,0 +1,867 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + plance + re + + + + balance + + + $PROJECT_DIR$/src/main + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554131416262 + + + 1560964434642 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SimpleMaven + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/pom.xml b/17020763_Dao_Kha_Hoang/JavaWeb/pom.xml new file mode 100644 index 0000000..583458c --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/pom.xml @@ -0,0 +1,115 @@ + + + 4.0.0 + + com.CodeCamp2019 + SimpleMaven + 1.0-SNAPSHOT + + org.springframework.boot + spring-boot-starter-parent + 2.0.5.RELEASE + + + + + + org.springframework.boot + spring-boot-starter-web + + + + + javax.servlet + jstl + 1.2 + + + + + org.apache.tomcat.embed + tomcat-embed-jasper + provided + + + org.springframework.boot + spring-boot-autoconfigure + 2.0.5.RELEASE + + + org.apache.struts + struts-tiles + 1.3.8 + + + org.assertj + assertj-core + 3.11.1 + + + org.springframework.boot + spring-boot-starter-data-jpa + + + mysql + mysql-connector-java + 8.0.16 + + + + org.hibernate + hibernate-core + 5.4.3.Final + + + + + + + + + + + + 1.8 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/Application.java b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/Application.java new file mode 100644 index 0000000..e1506bc --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/Application.java @@ -0,0 +1,20 @@ +package com.CodeCamp2019; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; + +@SpringBootApplication +public class Application extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(Application.class); + } + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } + +} \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/controller/CustomerController.java b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/controller/CustomerController.java new file mode 100644 index 0000000..a1b6887 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/controller/CustomerController.java @@ -0,0 +1,147 @@ +package com.CodeCamp2019.controller; + +import com.CodeCamp2019.model.Customer; +import com.CodeCamp2019.service.CustomerService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.*; + + +import java.util.List; + + + +@Controller +public class CustomerController { + + + @Autowired + CustomerService customerService; + + @RequestMapping("/") + public String index(Model model) { + List customerList = customerService.findAll(); + model.addAttribute("customerList", customerList); + return "home"; + } + + @GetMapping(value = "/insert") + public String insert() { + return "insert"; + } + + + @PostMapping(value = "/add") + public String addName(@RequestParam(value = "id"/*, required = false*/) int id, + @RequestParam(value = "fullname") String name, + @RequestParam(value = "email") String email, + @RequestParam(value = "phone") String phone, + @RequestParam(value = "balance") int balance + ) { + Customer cus1 = new Customer(id, name, email, phone, balance); + customerService.save(cus1); + return "redirect:/"; + } + + @RequestMapping(value = "/replace") + public String replace(@RequestParam(value = "customerId") int id, Model model) { + + //model.addAttribute("customerId",id); + model.addAttribute("customer1", customerService.getOne(id)); + return "replace"; + } + + @PostMapping(value = "/replaceCus") + public String replaceCustomer(@RequestParam(value = "id") int id, + @RequestParam(value = "name") String name, + @RequestParam(value = "email") String email, + @RequestParam(value = "phone") String phone, + @RequestParam(value = "balance") int balance + ){ + Customer customer = new Customer(id,name,email,phone,balance); + customerService.save(customer); + return "redirect:/"; + } + +//----------------------------------------------------------- + @RequestMapping(value = "/login") + public String login(){ + return "login"; + } + @PostMapping(value = "/login") + public String Login(@RequestParam(value = "username") String user, + @RequestParam(value = "password") String pass, + Model model + ){ + List customerList = customerService.findAll(); + for (Customer customer :customerList){ + if(customer.getEmail().equals(user) && pass.equals("123456")){ + + model.addAttribute("customer",customer); + return "inforUser"; + } + + } + model.addAttribute("customer",new Customer()); + return "loginFail"; + + } + +//--------------------------------------------------------- + @RequestMapping(value = "transfer") + public String transfer(@RequestParam(value = "transferFrom") int id, Model model){ + + model.addAttribute("id",id); + return "transfer"; + } + @PostMapping(value = "transferToID") + public String transferToID(@RequestParam(value = "fromId") int fromid, + @RequestParam(value = "id") int id, + @RequestParam(value = "amount") int amount + ){ + if(customerService.getOne(fromid).getBalance() >= amount ) { + Customer fromCustomer = customerService.getOne(fromid); + Customer toCustomer = customerService.getOne(id); + + fromCustomer.setBalance(fromCustomer.getBalance() - amount); + toCustomer.setBalance(toCustomer.getBalance() + amount); + + customerService.save(fromCustomer); + customerService.save(toCustomer); + + return "redirect:/"; + } + return "errorTransfer"; + + } + //------------------ + @RequestMapping(value = "delete") + public String removeCus(@RequestParam(value = "deleteID") int id, Model model){ + Customer customer = customerService.getOne(id); + model.addAttribute("deleteCustomer",customer); + return "deleteCustomer"; + } + @PostMapping(value = "/deleteCustomer") + public String deleteCustomer(@RequestParam(value = "id") int id){ + customerService.deleteCustomer(id); + return "redirect:/"; + } + @PostMapping("/cancel") + public String cancelDelete(){ + return "redirect:/"; + } + + //------------------------------------------------- + @GetMapping(value = "search") + public String search(@RequestParam(value = "information") String infor, + Model model){ + List customers = customerService.search(infor); + if(customers.size() != 0 ){ + model.addAttribute("customerList", customers); + return "home"; + } + return "notFound"; + } + +} \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/home.html b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/home.html new file mode 100644 index 0000000..b23531c --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/home.html @@ -0,0 +1,11 @@ + + + + + Hello + + +

Wellcome to Home!

+

Hi, hw are you?

+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/model/Customer.java b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/model/Customer.java new file mode 100644 index 0000000..c44213a --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/model/Customer.java @@ -0,0 +1,101 @@ +package com.CodeCamp2019.model; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +import javax.persistence.*; + +@Entity +@Table(name = "Customer") +@JsonIgnoreProperties("hibernateLazyInitializer") +public class Customer { + + @Id + @Column(name = "id") + @GeneratedValue(strategy = GenerationType.IDENTITY) + private int id; + + @Column(name = "name") + private String name; + + @Column(name = "email") + private String email; + + @Column(name = "phone") + private String phone; + @Column(name = "balance") + private int balance; + public Customer(){ + this.id = -1; + this.name = ""; + this.email = ""; + this.phone = ""; + this.balance = 0; + } + public Customer(Customer cu1){ + this.id = cu1.id; + this.name = cu1.name; + this.email = cu1.email; + this.phone = cu1.phone; + this.balance = cu1.balance; + } + public Customer(int id, String name, String email, String phone, int balance){ + this.id = id; + this.name = name; + this.email = email; + this.phone = phone; + this.balance = balance; + } + + + public void setName(String name) { + this.name = name; + } + + public void setEmail(String email) { + this.email = email; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public void setBalance(int balance) { + this.balance = balance; + } + + public void setId(int id) { + this.id = id; + } + + public int getId(){ + return this.id; + } + public String getName(){ + return this.name; + } + public String getEmail(){ + return this.email; + } + public String getPhone(){ + return this.phone; + } + public int getBalance(){ + return this.balance; + } + + public boolean isNull(){ + if(this.id != -1) return false; + return true; + } + /* + + create table Customer( + id int(5) not null auto_increment, + name varchar(50) not null, + email varchar(50) not null, + phone varchar(11) not null, + balance int(50) not null, + primary key (id) + ) engine=InnoDB Auto_increment=1 default charset=utf8; + */ +} diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/repository/CustomerRepository.java b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/repository/CustomerRepository.java new file mode 100644 index 0000000..5fac56e --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/repository/CustomerRepository.java @@ -0,0 +1,12 @@ +package com.CodeCamp2019.repository; + +import com.CodeCamp2019.model.Customer; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface CustomerRepository extends JpaRepository { + List findByNameContaining(String name); +} diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/service/CustomerService.java b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/service/CustomerService.java new file mode 100644 index 0000000..0db8d66 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/java/com/CodeCamp2019/service/CustomerService.java @@ -0,0 +1,30 @@ +package com.CodeCamp2019.service; + +import com.CodeCamp2019.model.Customer; +import com.CodeCamp2019.repository.CustomerRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class CustomerService { + + CustomerRepository customerRepository; + + @Autowired + public CustomerService(CustomerRepository customerRepository){ + this.customerRepository = customerRepository; + } + + public List findAll(){ + return customerRepository.findAll(); + } + public void save(Customer customer){ customerRepository.save(customer);} + public Customer getOne(int id){return customerRepository.getOne(id);} + public void deleteCustomer(int id){ + customerRepository.delete(customerRepository.getOne(id)); + } + public List search(String name){ return customerRepository.findByNameContaining(name);} + +} diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/resources/application.properties b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/resources/application.properties new file mode 100644 index 0000000..4658886 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/resources/application.properties @@ -0,0 +1,12 @@ +#spring +server.port=6699 +spring.mvc.view.prefix=/WEB-INF/views/ +spring.mvc.view.suffix=.jsp + +#hibernate +spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver +spring.datasource.url = jdbc:mysql://localhost:3306/uetcodecamp +spring.datasource.username=root +spring.datasource.password=123456789 +spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect +spring.jpa.show-sql=true \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/deleteCustomer.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/deleteCustomer.jsp new file mode 100644 index 0000000..04e2d53 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/deleteCustomer.jsp @@ -0,0 +1,52 @@ +<%@ page import="org.apache.catalina.util.CustomObjectInputStream" %> +<%@ page import="com.CodeCamp2019.model.Customer" %> + + + + + Confirm Page + + + + + +<% Customer cus = (Customer) request.getAttribute("deleteCustomer");%> +
+ +
+
Do you sure remove information customer?


+
ID: <%= cus.getId() %>
+
Name: <%= cus.getName() %>
+
Email: <%= cus.getEmail() %>
+
Phone: <%= cus.getPhone() %>
+
Balance: <%= cus.getBalance()%>

+
+
+ + +
+
+
+
+ + +
+
+
+ +
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/errorTransfer.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/errorTransfer.jsp new file mode 100644 index 0000000..207ac1c --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/errorTransfer.jsp @@ -0,0 +1,22 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + Error Page + + + + +
+

So du khong kha dung!

+
+ +
+

+
+ +
+
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/home.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/home.jsp new file mode 100644 index 0000000..723938a --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/home.jsp @@ -0,0 +1,80 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="com.CodeCamp2019.model.Customer" %> + + + + Home + + + + + + + +
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
IDFullNameEmailPhonePlance
${cus.id} ${cus.name} ${cus.email} ${cus.phone} ${cus.balance} +
+ + +
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/inforUser.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/inforUser.jsp new file mode 100644 index 0000000..e64549d --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/inforUser.jsp @@ -0,0 +1,43 @@ +<%@ page import="org.apache.catalina.util.CustomObjectInputStream" %> +<%@ page import="com.CodeCamp2019.model.Customer" %> + + + + + Information Page + + + + + + <% Customer cus = (Customer) request.getAttribute("customer");%> +
+ +
+
Information User


+
ID: <%= cus.getId() %>
+
Name: <%= cus.getName() %>
+
Email: <%= cus.getEmail() %>
+
Phone: <%= cus.getPhone() %>
+
Balance: <%= cus.getBalance()%>

+
+

+

+
+
+
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/insert.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/insert.jsp new file mode 100644 index 0000000..d58b312 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/insert.jsp @@ -0,0 +1,36 @@ +<%@ page import="java.util.ArrayList" %> + + + + Insert Page + + + + + + +
+
+

ADD USER

+
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/login.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/login.jsp new file mode 100644 index 0000000..92c9384 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/login.jsp @@ -0,0 +1,30 @@ +<%@ page import="com.CodeCamp2019.model.Customer" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + Login Page + + + + + +
+
+

LogIn

+ +
+
+ +
+ +
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/loginFail.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/loginFail.jsp new file mode 100644 index 0000000..681be1f --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/loginFail.jsp @@ -0,0 +1,28 @@ +<%@ page import="com.CodeCamp2019.model.Customer" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + Login Page + + + + +
+
+

LogIn Fail!
Tryagain!

+
+
+ +
+ +
+
+
+ +
+
+
+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/notFound.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/notFound.jsp new file mode 100644 index 0000000..5387685 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/notFound.jsp @@ -0,0 +1,13 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="com.CodeCamp2019.model.Customer" %> + + + + + Hello Page + + +

Not found customer!!

+ + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/replace.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/replace.jsp new file mode 100644 index 0000000..6e9750b --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/replace.jsp @@ -0,0 +1,40 @@ +<%@ page import="java.util.ArrayList" %> +<%@ page import="com.CodeCamp2019.model.Customer" %> + + + + + Replace Page + + + + <% Customer customer = (Customer) request.getAttribute("customer1"); %> + <% //Integer id = (Integer) request.getAttribute("customerId"); %> +
+
+
+
+
+
+


+
+
+ +
+ + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/transfer.jsp b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/transfer.jsp new file mode 100644 index 0000000..6f6beca --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/src/main/webapp/WEB-INF/views/transfer.jsp @@ -0,0 +1,34 @@ +<%@ page import="com.CodeCamp2019.model.Customer" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %> + + + + + + Transfer Page + + + + + <% Integer id = (Integer) request.getAttribute("id"); %> +
+
+
Transfers
+
+
+ + +
+

+
+
+

+
+ +
+
+
+
+ + + \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/META-INF/SimpleMaven.kotlin_module b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/META-INF/SimpleMaven.kotlin_module new file mode 100644 index 0000000..8fb6019 Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/META-INF/SimpleMaven.kotlin_module differ diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/application.properties b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/application.properties new file mode 100644 index 0000000..4658886 --- /dev/null +++ b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/application.properties @@ -0,0 +1,12 @@ +#spring +server.port=6699 +spring.mvc.view.prefix=/WEB-INF/views/ +spring.mvc.view.suffix=.jsp + +#hibernate +spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver +spring.datasource.url = jdbc:mysql://localhost:3306/uetcodecamp +spring.datasource.username=root +spring.datasource.password=123456789 +spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect +spring.jpa.show-sql=true \ No newline at end of file diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/Application.class b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/Application.class new file mode 100644 index 0000000..82923a3 Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/Application.class differ diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/controller/CustomerController.class b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/controller/CustomerController.class new file mode 100644 index 0000000..f73b75d Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/controller/CustomerController.class differ diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/model/Customer.class b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/model/Customer.class new file mode 100644 index 0000000..8fb45c7 Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/model/Customer.class differ diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/repository/CustomerRepository.class b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/repository/CustomerRepository.class new file mode 100644 index 0000000..418daad Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/repository/CustomerRepository.class differ diff --git a/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/service/CustomerService.class b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/service/CustomerService.class new file mode 100644 index 0000000..dbaa805 Binary files /dev/null and b/17020763_Dao_Kha_Hoang/JavaWeb/target/classes/com/CodeCamp2019/service/CustomerService.class differ