diff --git a/Week2-Project/DeepakPahuja002/EmployeeManagementSystem/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg b/Week2-Project/DeepakPahuja002/EmployeeManagementSystem/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg deleted file mode 100644 index 3663aac..0000000 Binary files a/Week2-Project/DeepakPahuja002/EmployeeManagementSystem/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg and /dev/null differ diff --git a/Week2-Project/SrishtyRawat027/backend/CyberWeek2/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg b/Week2-Project/SrishtyRawat027/backend/CyberWeek2/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg deleted file mode 100644 index 3663aac..0000000 Binary files a/Week2-Project/SrishtyRawat027/backend/CyberWeek2/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg and /dev/null differ diff --git a/Week2-Project/TaarakDhingraINT008/WebApplication1/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg b/Week2-Project/TaarakDhingraINT008/WebApplication1/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg deleted file mode 100644 index 3663aac..0000000 Binary files a/Week2-Project/TaarakDhingraINT008/WebApplication1/packages/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0/Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.0.0.nupkg and /dev/null differ diff --git a/Week3-Project/BhawnaSharma003/.gitignore b/Week3-Project/BhawnaSharma003/.gitignore new file mode 100644 index 0000000..c456c4a --- /dev/null +++ b/Week3-Project/BhawnaSharma003/.gitignore @@ -0,0 +1,25 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/build/ diff --git a/Week3-Project/BhawnaSharma003/.gitignore.txt b/Week3-Project/BhawnaSharma003/.gitignore.txt new file mode 100644 index 0000000..2a6ccb3 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/.gitignore.txt @@ -0,0 +1 @@ +spring-boot-rest-2/target/ diff --git a/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.jar b/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..01e6799 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.jar differ diff --git a/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.properties b/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..cd0d451 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.0/apache-maven-3.6.0-bin.zip diff --git a/Week3-Project/BhawnaSharma003/Background12.mp4 b/Week3-Project/BhawnaSharma003/Background12.mp4 new file mode 100644 index 0000000..65abf6d Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Background12.mp4 differ diff --git a/Week3-Project/BhawnaSharma003/Background2.mp4 b/Week3-Project/BhawnaSharma003/Background2.mp4 new file mode 100644 index 0000000..3e9a88a Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Background2.mp4 differ diff --git a/Week3-Project/BhawnaSharma003/CyberGroup.css b/Week3-Project/BhawnaSharma003/CyberGroup.css new file mode 100644 index 0000000..002fcf1 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/CyberGroup.css @@ -0,0 +1,70 @@ +body +{ + margin: 0; + padding: 0; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + background-image: url(Pic35.jpeg); + background-size: 100% 100%; + background-attachment: fixed; +} +ul +{ + margin: 0; + padding: 0; + display: flex; +} +ul li +{ + list-style: none; + margin: 0 20px; + transition: 0.5s; + +} +ul li a{ + display: block; + position: relative; + text-decoration: none; + padding: 10px; + font-size: 37px; + font-weight: bold; + font-family:cursive; + color: #fff; + text-transform: uppercase; + transition: 0.5s; + +} +ul:hover li a +{ + transform: scale(1.5); + opacity: .2; + filter: blur(5px); +} +ul li a:hover +{ + transform: scale(2); + opacity: 1; + filter: blur(0); + filter: blur(0); +} +ul li a: before{ + content: ''; + position: absolute; + top:0; + left:0; + width:100%; + height:100%; + background: #ff497c; + transition: transform 0.5s; + transform-origin: right; + transform: scaleX(0); + z-index: -1; +} +ul li a :hover:before +{ + transition: transform 0.5s; + transform-origin: left; + transform: scaleX(1); +} \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/CyberGroup.html b/Week3-Project/BhawnaSharma003/CyberGroup.html new file mode 100644 index 0000000..751dd3b --- /dev/null +++ b/Week3-Project/BhawnaSharma003/CyberGroup.html @@ -0,0 +1,19 @@ + + + + + Cyber Group + + + + + + + diff --git a/Week3-Project/BhawnaSharma003/Database.txt b/Week3-Project/BhawnaSharma003/Database.txt new file mode 100644 index 0000000..2ea2d0e --- /dev/null +++ b/Week3-Project/BhawnaSharma003/Database.txt @@ -0,0 +1,14 @@ +--DATABASE CREATION +CREATE DATABASE EMPLOYEEJAVA; + +--TABLE CREATION +CREATE TABLE DETAILS (ID INT IDENTITY(1,1),USERNAME VARCHAR(200),PASS VARCHAR(50)); + +--VALUES IN THE TABLE +INSERT INTO DETAILS VALUES ('BHAWNA123','BHAWNA123'); +INSERT INTO DETAILS VALUES ('AARUSHI22','AARUSHI22'); +INSERT INTO DETAILS VALUES ('ISHA11','ISHA11'); +INSERT INTO DETAILS VALUES ('SWAINI22','SWAINI22'); + +--TABLE +SELECT * FROM DETAILS; diff --git a/Week3-Project/BhawnaSharma003/EnterDetails.css b/Week3-Project/BhawnaSharma003/EnterDetails.css new file mode 100644 index 0000000..a5689a2 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/EnterDetails.css @@ -0,0 +1,182 @@ +body{ + background-image: url("Pic22.jpg"); + background-size: 100% 100%; + background-attachment: fixed; + margin: 0; + padding: 0; + font-family: sans-serif; +} + + +.loginBox{ + position: absolute; + top: 63%; + left: 30%; + transform: translate(-50%,-50%); + width: 300px; + height: 650px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,0); + +} +.loginBox2{ + position: absolute; + top: 63%; + left: 70%; + transform: translate(-50%,-50%); + width: 300px; + height: 650px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,0); + +} +.loginBox1{ + position: absolute; + top: 63%; + left: 50%; + transform: translate(-50%,-50%); + width: 300px; + height: 650px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,0); + +} + +.loginBox p{ + margin:0; + padding: 0; + font-weight: bold; + color:#fff; + +} +.loginBox2 p{ + margin:0; + padding: 0; + font-weight: bold; + color:#fff; + +} +.loginBox1 p{ + margin:0; + padding: 0; + font-weight: bold; + color:#fff; + +} +.loginBox input{ + width: 100%; + margin-bottom: 20px; + +} +.loginBox2 input{ + width: 100%; + margin-bottom: 20px; + +} +.loginBox1 input{ + width: 100%; + margin-bottom: 20px; + +} +.loginBox input[type="date"]{ + border: none; + background: transparent; + color:gray; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox1 input[type="number"]{ + border: none; + background: transparent; + color:white; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox2 input[type="number"]{ + border: none; + background: transparent; + color:white; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox1 input[type="date"]{ + border: none; + background: transparent; + color:gray; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox input[type="number"]{ + border: none; + background: transparent; + color:white; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox2 input[type="url"]{ + border: none; + background: transparent; + color:white; + font-size: 14px; + border-bottom: 1px solid #fff; + height: 40px; +} +.loginBox input[type="text"]{ + border: none; + border-bottom: 1px solid #fff; + background: transparent; + outline: none; + height: 40px; + color: #fff; + font-size: 14px; +} + +.loginBox2 input[type="text"]{ + border: none; + border-bottom: 1px solid #fff; + background: transparent; + outline: none; + height: 40px; + color: #fff; + font-size: 14px; +} +.loginBox1 input[type="text"]{ + border: none; + border-bottom: 1px solid #fff; + background: transparent; + outline: none; + height: 40px; + color: #fff; + font-size: 14px; +} +::placeholder{ + color: rgba(255,255,255,.5); +} +.loginBox1 input[type="button"] +{ + border: none; + outline: none; + height: 40px; + color:white ; + font-size: 30px; + font-family: serif; + background-image: url("Pic28.jpg"); + box-shadow: 5px 5px 5px black; + font-weight: bold; + cursor: pointer; + +} + +.loginBox1 input[type="button"]:hover{ + background-image: url("Pic24.jpeg"); + box-shadow: 5px 5px 5px black; +} + diff --git a/Week3-Project/BhawnaSharma003/EnterDetails.html b/Week3-Project/BhawnaSharma003/EnterDetails.html new file mode 100644 index 0000000..b4a4a03 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/EnterDetails.html @@ -0,0 +1,75 @@ + + + + + + Employee Details + + + + + +
+ logo + +
+ +
+ +
+

Employment Id

+ +

First Name

+ +

Last Name

+ +

Contact Number

+ +

Date Of Birth

+



+ + + + + +
+
+
+ +
+

Department Id

+ +

Department Name

+ +

Designation

+ +

Salary (per annum)

+ +

Hire Date

+



+
+ + +
+
+
+ +
+

Pan Card Number

+ +

Residential Address

+ +

Email ID

+ +

GitHub Username

+ +

LinkedIn Profile URL

+



+ + + +
+
+ + + \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/EnterDetails.js b/Week3-Project/BhawnaSharma003/EnterDetails.js new file mode 100644 index 0000000..bc2fcba --- /dev/null +++ b/Week3-Project/BhawnaSharma003/EnterDetails.js @@ -0,0 +1,42 @@ +function onClick(){ + Info= { + + "EmploymentId": $('#EmploymentId').val(), + "FirstName": $('#FirstName').val(), + "LastName": $('#LastName').val(), + "ContactNo": $('#ContactNumber').val(), + "DateOfBirth": $('#DateOfBirth').val(), + "DepartmentId": $('#DepartmentId').val(), + "DepartmentName": $('#DepartmentName').val(), + "Designation1": $('#Designation').val(), + "Salary": $('#Salary').val(), + "HireDate": $('#HireDate').val(), + "PanCardNumber": $('#PanCardNumber').val(), + "EmailID": $('#EmailID').val(), + "GitHubUsername": $('#GitHubUsername').val(), + "LinkedInProfile": $('#LinkedInProfile').val(), + "ResidentialAddress": $('#ResidentialAddress').val() + } + + $.ajax({ + type : "POST", + url : "http://localhost:61286/api/EMPLOYEEs/", + + dataType : "json", + data : regData, debugger; + error: function(e) + { + console.log(e); + }, + success : function (msg) { + if (msg) { + alert("Successful Update"); + + } + else { + alert("Unsuccessful Update !"); + } + } + }); + +} \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/List.css b/Week3-Project/BhawnaSharma003/List.css new file mode 100644 index 0000000..7dcae0a --- /dev/null +++ b/Week3-Project/BhawnaSharma003/List.css @@ -0,0 +1,70 @@ +h2{ + margin:0; + + color: brown; + font-size: 40px; + font-family: cursive; + text-align: center; + font-weight: "bold"; +} +body{ + background-image: url("pic23.jpg"); + background-size: 100% 100%; + background-attachment: fixed; + margin: 0; + padding: 0; + font-family: sans-serif; +} + + +.loginBox{ + position: absolute; + top: 70%; + left: 40%; + transform: translate(-40%,-50%); + width: 300px; + height: 650px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,0); + +} + +table, th, td{ + border:1px solid black; + + +} +th, td{ + padding: 10px; + text-align: center; +} +th{ + color: blueviolet; +} +.loginBox input[type="button"] +{ + border: none; + outline: none; + height: 40px; + color:white; + font-size: 30px; + font-family: serif; + background-image: url("pic34.jpeg"); + + + box-shadow: 5px 5px 5px black; + font-weight: bold; + cursor: pointer; + width: 300px; + transform: translate(30%,10%); +} +.loginBox input[type="button"]:hover{ + background-image: url("Pic31.jpg"); + box-shadow: 5px 5px 5px black; +} + + + + + diff --git a/Week3-Project/BhawnaSharma003/List.html b/Week3-Project/BhawnaSharma003/List.html new file mode 100644 index 0000000..b4f5c6f --- /dev/null +++ b/Week3-Project/BhawnaSharma003/List.html @@ -0,0 +1,39 @@ + + + + + + List Of Members + + + + + +
+ logo + +
+

Members Of Our Family

+
+ + + + + + + + + + + +
First NameLast NameContact Number



+
+ + + + +
+ + + + diff --git a/Week3-Project/BhawnaSharma003/List.js b/Week3-Project/BhawnaSharma003/List.js new file mode 100644 index 0000000..84c4bcf --- /dev/null +++ b/Week3-Project/BhawnaSharma003/List.js @@ -0,0 +1,40 @@ +function getEmployee(){ + $.ajax({ + url: 'http://localhost:61286/api/EMPLOYEEs/', + type: 'GET', + dataType: 'json', + success: function(res){ + console.log(res); + $.each(res, function (i, item) { + var rows = "" + + "" + item.FirstName + "" + + "" + item.LastName + "" + + + "" + item.ContactNo + "" + + + "" + + "" + + ""; + $('#EMPLOYEE').append(rows); + }); + } + }); +} +function deleteEmployee(EmployeementId){ + var del_id = Number(EmployeementId); + console.log(del_id); + $.ajax({ + type: "DELETE", + url: "http://localhost:50191/api/Employees/"+del_id, + contentType:"application/json", + success: function(){ + window.location = "List.html"; + }, + failure:function(){ + alert("Unable to delete..!"); + } + }); +} +function updateEmployee(id){ + window.location="update.html?id="+EmployeementId; +} \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/LoginPage.css b/Week3-Project/BhawnaSharma003/LoginPage.css new file mode 100644 index 0000000..4332ca9 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/LoginPage.css @@ -0,0 +1,89 @@ +body{ + background-color: aliceblue; + background-size: cover; + margin: 0; + padding: 0; + font-family: sans-serif; +} +.video_selector{ + position: fixed; + right: 0; + bottom: 0; + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + z-index: -999; +} +.loginBox{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + width: 500px; + height: 480px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,.5); + box-shadow: 10px 5px 5px black; +} +h2{ + margin:0; + padding: 0 0 60px; + color: lightblue; + font-size: 30px; + font-family: serif; + text-align: center; +} +.loginBox p{ + margin:0; + padding: 0; + font-weight: bold; + color:#fff; + +} +.loginBox input{ + width: 100%; + margin-bottom: 20px; + +} +.loginBox input[type="text"],.loginBox input[type="password"]{ + border: none; + border-bottom: 1px solid #fff; + background: transparent; + outline: none; + height: 40px; + color: #fff; + font-size: 16px; +} +::placeholder{ + color: rgba(255,255,255,.5); +} +.loginBox input[type="button"] +{ + border: none; + outline: none; + height: 40px; + color: black; + font-size: 20px; + font-family: serif; + background-image: url("pic10.jpeg"); + box-shadow: 5px 5px 5px cadetblue; + font-weight: bold; + cursor: pointer; + border-radius: 20px; +} +.loginBox a{ + font-size: 16px; + color: darkgray; + text-align: center; +} +.loginBox input[type="button"]:hover{ + background-image: url("pic17.jpeg"); + box-shadow: 5px 5px 5px chocolate; +} +.error{ + color: red; + font-style: italic; + font-size: 10px; +} \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/Pic22.jpg b/Week3-Project/BhawnaSharma003/Pic22.jpg new file mode 100644 index 0000000..abe6f20 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Pic22.jpg differ diff --git a/Week3-Project/BhawnaSharma003/Pic24.jpeg b/Week3-Project/BhawnaSharma003/Pic24.jpeg new file mode 100644 index 0000000..65c0974 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Pic24.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/Pic28.jpg b/Week3-Project/BhawnaSharma003/Pic28.jpg new file mode 100644 index 0000000..0d82b58 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Pic28.jpg differ diff --git a/Week3-Project/BhawnaSharma003/Pic31.jpg b/Week3-Project/BhawnaSharma003/Pic31.jpg new file mode 100644 index 0000000..b4d88e6 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Pic31.jpg differ diff --git a/Week3-Project/BhawnaSharma003/Pic35.jpeg b/Week3-Project/BhawnaSharma003/Pic35.jpeg new file mode 100644 index 0000000..1147e55 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Pic35.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/README.md b/Week3-Project/BhawnaSharma003/README.md new file mode 100644 index 0000000..e90bef9 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/README.md @@ -0,0 +1,3 @@ +Netlify Link + +https://bhawnasharma003.netlify.com/index.html diff --git a/Week3-Project/BhawnaSharma003/Screenshot (49).png b/Week3-Project/BhawnaSharma003/Screenshot (49).png new file mode 100644 index 0000000..4a584ad Binary files /dev/null and b/Week3-Project/BhawnaSharma003/Screenshot (49).png differ diff --git a/Week3-Project/BhawnaSharma003/SignUpPage.css b/Week3-Project/BhawnaSharma003/SignUpPage.css new file mode 100644 index 0000000..ebbb493 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/SignUpPage.css @@ -0,0 +1,85 @@ +body{ + background-color: aliceblue; + background-size: cover; + margin: 0; + padding: 0; + font-family: sans-serif; +} +.video_selector{ + position: fixed; + right: 0; + bottom: 0; + min-width: 100%; + min-height: 100%; + width: auto; + height: auto; + z-index: -999; +} +.loginBox{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%,-50%); + width: 500px; + height: 600px; + padding: 40px 40px; + box-sizing: border-box; + background: rgba(0,0,0,.8); + box-shadow: 2px 4px 4px white; + border-radius: 20px; +} +h2{ + margin:0; + padding: 0 0 30px; + color: darkorange; + font-size: 30px; + font-family: serif; + text-align: center; +} +.loginBox p{ + margin:0; + padding: 0; + font-weight: bold; + color:#fff; + +} +.loginBox input{ + width: 100%; + margin-bottom: 20px; + +} +.loginBox input[type="text"],.loginBox input[type="password"]{ + border: none; + border-bottom: 1px solid #fff; + background: transparent; + outline: none; + height: 40px; + color: #fff; + font-size: 14px; +} +::placeholder{ + color: rgba(255,255,255,.5); +} +.loginBox input[type="button"] +{ + border: none; + outline: none; + height: 40px; + color: black; + font-size: 20px; + font-family: serif; + background-image: url("pic17.jpeg"); + box-shadow: 5px 5px 5px chocolate; + font-weight: bold; + cursor: pointer; + border-radius: 20px; +} +.loginBox a{ + font-size: 16px; + color: darkgray; + text-align: center; +} +.loginBox input[type="button"]:hover{ + background-image: url("pic20.jpeg"); + box-shadow: 5px 5px 5px gray; +} \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/SignUpPage.html b/Week3-Project/BhawnaSharma003/SignUpPage.html new file mode 100644 index 0000000..3848180 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/SignUpPage.html @@ -0,0 +1,40 @@ + + + + + + Sign Up + + + +
+ logo + +
+ +
+

Create A New Account

+
+

Name

+ + +

Employment Id

+ +

Email

+ +

Password

+ +

Confirm Password

+ +

+
+ + +
+
+ + + \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/index.html b/Week3-Project/BhawnaSharma003/index.html new file mode 100644 index 0000000..f215092 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/index.html @@ -0,0 +1,38 @@ + + + + + + Log In + + + +
+ logo + +
+ +
+

WELCOME, Please Log In

+
+

Email

+ + +

Password

+ + Forget password ?



+
+

Don't have an account?

Sign Up + + +
+
+ + + + + + \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/logo.png b/Week3-Project/BhawnaSharma003/logo.png new file mode 100644 index 0000000..1d1dd57 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/logo.png differ diff --git a/Week3-Project/BhawnaSharma003/mvnw b/Week3-Project/BhawnaSharma003/mvnw new file mode 100644 index 0000000..5551fde --- /dev/null +++ b/Week3-Project/BhawnaSharma003/mvnw @@ -0,0 +1,286 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG="`dirname "$PRG"`/$link" + fi + done + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found .mvn/wrapper/maven-wrapper.jar" + fi +else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." + fi + jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" + while IFS="=" read key value; do + case "$key" in (wrapperUrl) jarUrl="$value"; break ;; + esac + done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" + if [ "$MVNW_VERBOSE" = true ]; then + echo "Downloading from: $jarUrl" + fi + wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" + + if command -v wget > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found wget ... using wget" + fi + wget "$jarUrl" -O "$wrapperJarPath" + elif command -v curl > /dev/null; then + if [ "$MVNW_VERBOSE" = true ]; then + echo "Found curl ... using curl" + fi + curl -o "$wrapperJarPath" "$jarUrl" + else + if [ "$MVNW_VERBOSE" = true ]; then + echo "Falling back to using Java to download" + fi + javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" + if [ -e "$javaClass" ]; then + if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Compiling MavenWrapperDownloader.java ..." + fi + # Compiling the Java class + ("$JAVA_HOME/bin/javac" "$javaClass") + fi + if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then + # Running the downloader + if [ "$MVNW_VERBOSE" = true ]; then + echo " - Running MavenWrapperDownloader.java ..." + fi + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +if [ "$MVNW_VERBOSE" = true ]; then + echo $MAVEN_PROJECTBASEDIR +fi +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/Week3-Project/BhawnaSharma003/mvnw.cmd b/Week3-Project/BhawnaSharma003/mvnw.cmd new file mode 100644 index 0000000..e5cfb0a --- /dev/null +++ b/Week3-Project/BhawnaSharma003/mvnw.cmd @@ -0,0 +1,161 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.4.2/maven-wrapper-0.4.2.jar" +FOR /F "tokens=1,2 delims==" %%A IN (%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties) DO ( + IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + echo Found %WRAPPER_JAR% +) else ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %DOWNLOAD_URL% + powershell -Command "(New-Object Net.WebClient).DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')" + echo Finished downloading %WRAPPER_JAR% +) +@REM End of extension + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/Week3-Project/BhawnaSharma003/pic10.jpeg b/Week3-Project/BhawnaSharma003/pic10.jpeg new file mode 100644 index 0000000..c17cf37 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/pic10.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/pic17.jpeg b/Week3-Project/BhawnaSharma003/pic17.jpeg new file mode 100644 index 0000000..12014c6 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/pic17.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/pic20.jpeg b/Week3-Project/BhawnaSharma003/pic20.jpeg new file mode 100644 index 0000000..ad08dcd Binary files /dev/null and b/Week3-Project/BhawnaSharma003/pic20.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/pic23.jpg b/Week3-Project/BhawnaSharma003/pic23.jpg new file mode 100644 index 0000000..1ce9ec7 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/pic23.jpg differ diff --git a/Week3-Project/BhawnaSharma003/pic34.jpeg b/Week3-Project/BhawnaSharma003/pic34.jpeg new file mode 100644 index 0000000..e042988 Binary files /dev/null and b/Week3-Project/BhawnaSharma003/pic34.jpeg differ diff --git a/Week3-Project/BhawnaSharma003/pom.xml b/Week3-Project/BhawnaSharma003/pom.xml new file mode 100644 index 0000000..8aedd79 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/pom.xml @@ -0,0 +1,145 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 2.0.9.BUILD-SNAPSHOT + + + com.example + spring-boot-rest-2 + 0.0.1-SNAPSHOT + spring-boot-rest-2 + Demo project for Spring Boot + + + 1.8 + + + + + org.springframework.boot + spring-boot-starter + + + + org.springframework.boot + spring-boot-starter-test + test + + + + + org.springframework.boot + + spring-boot-starter + + + + + + + + org.springframework.boot + + spring-boot-starter-test + + test + + + + + + + + org.springframework.boot + + spring-boot-starter + + + + + + + + org.springframework + + spring-web + + + + + + + + org.springframework.boot + + spring-boot-starter-web + + + + + + + + org.springframework.boot + + spring-boot-starter-test + + test + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + + src/main/resources + + true + + + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/milestone + + + + diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistration.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistration.java new file mode 100644 index 0000000..8aa64fc --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistration.java @@ -0,0 +1,118 @@ +package com.example.beans; + +import java.util.ArrayList; + +import java.util.List; + + + +public class StudentRegistration { + private List studentRecords; + + + + private static StudentRegistration stdregd = null; + + + + private StudentRegistration(){ + + studentRecords = new ArrayList(); + + } + + + + public static StudentRegistration getInstance() { + + + + if(stdregd == null) { + + stdregd = new StudentRegistration(); + + return stdregd; + + } + + else { + + return stdregd; + + } + + } + + + + public void add(student std) { + + studentRecords.add(std); + + } + + + +public String upDateStudent(student std) { + + + +for(int i=0; i getStudentRecords() { + + return studentRecords; + + } + +} diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistrationReply.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistrationReply.java new file mode 100644 index 0000000..08cf381 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/StudentRegistrationReply.java @@ -0,0 +1,62 @@ +package com.example.beans; + +public class StudentRegistrationReply { + + String name; + + int age; + + String registrationNumber; + + String registrationStatus; + + + + public String getName() { + + return name; + + } + + public void setName(String name) { + + this.name = name; + + } + + public int getAge() { + + return age; + + } + + public void setAge(int age) { + + this.age = age; + + } + + public String getRegistrationNumber() { + + return registrationNumber; + + } + + public void setRegistrationNumber(String registrationNumber) { + + this.registrationNumber = registrationNumber; + + } + + public String getRegistrationStatus() { + + return registrationStatus; + + } + + public void setRegistrationStatus(String registrationStatus) { + + this.registrationStatus = registrationStatus; + + } +} diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/student.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/student.java new file mode 100644 index 0000000..556d7af --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/beans/student.java @@ -0,0 +1,26 @@ +package com.example.beans; + +public class student { + + String name; + int age; + String registrationNumber; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public int getAge() { + return age; + } + public void setAge(int age) { + this.age = age; + } + public String getRegistrationNumber() { + return registrationNumber; + } + public void setRegistrationNumber(String registrationNumber) { + this.registrationNumber = registrationNumber; + } +} diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRegistrationController.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRegistrationController.java new file mode 100644 index 0000000..c2330c6 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRegistrationController.java @@ -0,0 +1,54 @@ +package com.example.controllers; + +//import java.util.List; + +import org.springframework.stereotype.Controller; + +import org.springframework.web.bind.annotation.RequestBody; + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RequestMethod; + +import org.springframework.web.bind.annotation.ResponseBody; + + + +import com.example.beans.*; + + + +@Controller + +public class StudentRegistrationController { + @RequestMapping(method = RequestMethod.POST, value="/register/student") + + + + @ResponseBody + + public StudentRegistrationReply registerStudent(@RequestBody student student) { + + System.out.println("In registerStudent"); + + StudentRegistrationReply stdregreply = new StudentRegistrationReply(); + + StudentRegistration.getInstance().add(student); + + //We are setting the below value just to reply a message back to the caller + + stdregreply.setName(student.getName()); + + stdregreply.setAge(student.getAge()); + + stdregreply.setRegistrationNumber(student.getRegistrationNumber()); + + stdregreply.setRegistrationStatus("Successful"); + + + + return stdregreply; + + } + +} diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRetrieveController.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRetrieveController.java new file mode 100644 index 0000000..b963e53 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/controllers/StudentRetrieveController.java @@ -0,0 +1,26 @@ +package com.example.controllers; +import java.util.List; + +import org.springframework.stereotype.Controller; + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RequestMethod; + +import org.springframework.web.bind.annotation.ResponseBody; + +import com.example.beans.student; +import com.example.beans.StudentRegistration; + +@Controller +public class StudentRetrieveController { + + @RequestMapping(method = RequestMethod.GET, value="/student/allstudent") + @ResponseBody + public List getAllStudents() { + + return StudentRegistration.getInstance().getStudentRecords(); + + } + +} diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/demo/SpringBootRest2Application.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/demo/SpringBootRest2Application.java new file mode 100644 index 0000000..c0c378a --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/demo/SpringBootRest2Application.java @@ -0,0 +1,15 @@ +package com.example.demo; + +import org.springframework.boot.SpringApplication; + +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication(scanBasePackages = {"com.example"}) +public class SpringBootRest2Application { + + public static void main(String[] args) { + SpringApplication.run(SpringBootRest2Application.class, args); + } + +} + diff --git a/Week3-Project/BhawnaSharma003/src/main/java/com/example/repository/jdbcimpliment.java b/Week3-Project/BhawnaSharma003/src/main/java/com/example/repository/jdbcimpliment.java new file mode 100644 index 0000000..dc86243 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/java/com/example/repository/jdbcimpliment.java @@ -0,0 +1,57 @@ +package com.example.repository; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +public class jdbcimpliment { + public static void main(String[] args) + { + Connection conn = null; + System.out.println("123"); + try { + String dbURL = "jdbc:sqlserver://DESKTOP-8SSRL3P;databaseName=Student"; + + + + conn = DriverManager.getConnection(dbURL,"sa","Bhawna220@"); + if(conn!=null) { + Statement stmt = conn.createStatement(); + stmt.execute("DROP TABLE PersonTest"); + String query = "CREATE TABLE PersonTest(\r\n"+ + "PersonID int,\r\n" + + " LastName varchar(255),\r\n "+ + " FirstName varchar(50),\r\n "+ + "Address varchar(255),\r\n"+ + "City varchar(30)\r\n"+ + ");"; + stmt.execute(query); + String query2="Insert into PersonTest values('123','Sharma','Bhawna','Pitampura','Delhi');"; + stmt.execute(query2); + String sql ="Select * from PersonTest"; + ResultSet rs = stmt.executeQuery(sql); + while(rs.next()) { + System.out.println(rs.getString("PersonID")+":"+rs.getString("FirstName")+":"+rs.getString("LastName")+":"); + + } + + } + + } + catch(Exception se) { + se.printStackTrace(); + } + finally { + if(conn!=null) { + try { + conn.close(); + }catch (SQLException e) { + e.printStackTrace(); + } + } + } + + } + +} diff --git a/Week3-Project/BhawnaSharma003/src/main/resources/application.properties b/Week3-Project/BhawnaSharma003/src/main/resources/application.properties new file mode 100644 index 0000000..fb10ce7 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/main/resources/application.properties @@ -0,0 +1,2 @@ +server.port=8083 +spring.profiles.active=@spring.profiles.active@ \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/src/test/java/com/example/demo/SpringBootRest2ApplicationTests.java b/Week3-Project/BhawnaSharma003/src/test/java/com/example/demo/SpringBootRest2ApplicationTests.java new file mode 100644 index 0000000..e55da54 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/src/test/java/com/example/demo/SpringBootRest2ApplicationTests.java @@ -0,0 +1,17 @@ +package com.example.demo; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class SpringBootRest2ApplicationTests { + + @Test + public void contextLoads() { + } + +} + diff --git a/Week3-Project/BhawnaSharma003/target/classes/application.properties b/Week3-Project/BhawnaSharma003/target/classes/application.properties new file mode 100644 index 0000000..fb10ce7 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/classes/application.properties @@ -0,0 +1,2 @@ +server.port=8083 +spring.profiles.active=@spring.profiles.active@ \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/target/maven-archiver/pom.properties b/Week3-Project/BhawnaSharma003/target/maven-archiver/pom.properties new file mode 100644 index 0000000..77f9503 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/maven-archiver/pom.properties @@ -0,0 +1,4 @@ +#Created by Apache Maven 3.6.0 +groupId=com.example +artifactId=spring-boot-rest-2 +version=0.0.1-SNAPSHOT diff --git a/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..8da5c41 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -0,0 +1,6 @@ +com\example\controllers\StudentRetrieveController.class +com\example\beans\student.class +com\example\beans\StudentRegistrationReply.class +com\example\beans\StudentRegistration.class +com\example\controllers\StudentRegistrationController.class +com\example\demo\SpringBootRest2Application.class diff --git a/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..67ce6a2 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1,6 @@ +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\beans\StudentRegistration.java +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\beans\student.java +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\demo\SpringBootRest2Application.java +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\controllers\StudentRegistrationController.java +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\beans\StudentRegistrationReply.java +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\main\java\com\example\controllers\StudentRetrieveController.java diff --git a/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst new file mode 100644 index 0000000..22944d0 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -0,0 +1 @@ +com\example\demo\SpringBootRest2ApplicationTests.class diff --git a/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst new file mode 100644 index 0000000..862702b --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -0,0 +1 @@ +C:\Users\Bhawna.Sharma\eclipse-workspace\spring-boot-rest-2\src\test\java\com\example\demo\SpringBootRest2ApplicationTests.java diff --git a/Week3-Project/BhawnaSharma003/target/spring-boot-rest-2-0.0.1-SNAPSHOT.jar.original b/Week3-Project/BhawnaSharma003/target/spring-boot-rest-2-0.0.1-SNAPSHOT.jar.original new file mode 100644 index 0000000..4ec075b Binary files /dev/null and b/Week3-Project/BhawnaSharma003/target/spring-boot-rest-2-0.0.1-SNAPSHOT.jar.original differ diff --git a/Week3-Project/BhawnaSharma003/target/surefire-reports/2019-02-04T16-29-11_512.dumpstream b/Week3-Project/BhawnaSharma003/target/surefire-reports/2019-02-04T16-29-11_512.dumpstream new file mode 100644 index 0000000..cf36fb6 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/surefire-reports/2019-02-04T16-29-11_512.dumpstream @@ -0,0 +1,15 @@ +# Created on 2019-02-04T16:29:11.514 +WARNING: An illegal reflective access operation has occurred + +# Created on 2019-02-04T16:29:11.585 +WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/Bhawna.Sharma/.m2/repository/org/springframework/spring-core/5.0.12.RELEASE/spring-core-5.0.12.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) + +# Created on 2019-02-04T16:29:11.603 +WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 + +# Created on 2019-02-04T16:29:11.616 +WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations + +# Created on 2019-02-04T16:29:11.630 +WARNING: All illegal access operations will be denied in a future release + diff --git a/Week3-Project/BhawnaSharma003/target/surefire-reports/TEST-com.example.demo.SpringBootRest2ApplicationTests.xml b/Week3-Project/BhawnaSharma003/target/surefire-reports/TEST-com.example.demo.SpringBootRest2ApplicationTests.xml new file mode 100644 index 0000000..b94be29 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/surefire-reports/TEST-com.example.demo.SpringBootRest2ApplicationTests.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Week3-Project/BhawnaSharma003/target/surefire-reports/com.example.demo.SpringBootRest2ApplicationTests.txt b/Week3-Project/BhawnaSharma003/target/surefire-reports/com.example.demo.SpringBootRest2ApplicationTests.txt new file mode 100644 index 0000000..88b9885 --- /dev/null +++ b/Week3-Project/BhawnaSharma003/target/surefire-reports/com.example.demo.SpringBootRest2ApplicationTests.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: com.example.demo.SpringBootRest2ApplicationTests +------------------------------------------------------------------------------- +Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.113 s - in com.example.demo.SpringBootRest2ApplicationTests