Commit d78c4936 authored by sgandhi@nisum.com's avatar sgandhi@nisum.com

merging master changes to shiva_demo_branch

# Conflicts:
#	.idea/.gitignore
#	.idea/compiler.xml
#	.idea/gradle.xml
parents 9be7024e 92934983
#Fri May 22 10:17:52 IST 2020
gradle.version=6.2.1
#Fri May 22 11:54:46 IST 2020
gradle.version=6.3
# Default ignored files
/workspace.xml
/workspace.xml
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Gradle Imported" enabled="true">
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$USER_HOME$/.gradle/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.12/48e4e5d60309ebd833bc528dcf77668eab3cd72c/lombok-1.18.12.jar" />
</processorPath>
<module name="demo-project-git-operations.main" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
......
......@@ -38,7 +38,7 @@
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.134s</div>
<div class="counter">0.370s</div>
<p>duration</p>
</div>
</td>
......@@ -85,7 +85,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.134s</td>
<td>0.370s</td>
<td class="success">100%</td>
</tr>
</tbody>
......@@ -112,7 +112,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.134s</td>
<td>0.370s</td>
<td class="success">100%</td>
</tr>
</tbody>
......@@ -126,7 +126,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 6.2.1</a> at 22 May, 2020 10:18:53 AM</p>
<a href="http://www.gradle.org">Gradle 6.3</a> at 22-May-2020, 12:22:38 PM</p>
</div>
</div>
</body>
......
......@@ -40,7 +40,7 @@
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.134s</div>
<div class="counter">0.370s</div>
<p>duration</p>
</div>
</td>
......@@ -83,7 +83,7 @@
<td>1</td>
<td>0</td>
<td>0</td>
<td>0.134s</td>
<td>0.370s</td>
<td class="success">100%</td>
</tr>
</table>
......@@ -96,7 +96,7 @@
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="http://www.gradle.org">Gradle 6.2.1</a> at 22 May, 2020 10:18:53 AM</p>
<a href="http://www.gradle.org">Gradle 6.3</a> at 22-May-2020, 12:22:38 PM</p>
</div>
</div>
</body>
......
Manifest-Version: 1.0
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.nisum.epe.demo.DemoApplication
Spring-Boot-Version: 2.2.7.RELEASE
Spring-Boot-Classes: BOOT-INF/classes/
Spring-Boot-Lib: BOOT-INF/lib/
Spring-Boot-Version: 2.2.7.RELEASE
Main-Class: org.springframework.boot.loader.JarLauncher
package com.nisum.epe.demo.resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.xml.ws.Response;
@RestController
public class PromotionEngineResource {
@GetMapping("pe/apply/dollar/off/benefit")
public String applyPromotions() {
return "dollar off promtions applied";
}
}
\ No newline at end of file
package com.nisum.epe.demo.srinivas;
public class Employee {
private String empName;
private int empSal;
public Employee(String empName, int empSal) {
this.empName = empName;
this.empSal = empSal;
}
public String getEmpName() {
return empName;
}
public void setEmpName(String empName) {
this.empName = empName;
}
public int getEmpSal() {
return empSal;
}
public void setEmpSal(int empSal) {
this.empSal = empSal;
}
}
package com.nisum.epe.demo.srinivas;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
@RestController
public class Resource {
List<Employee> employees = new ArrayList<>();
@RequestMapping("/saveEmployeeDetails")
public void saveEmployeeDetails(@RequestBody Employee employee) {
//System.out.println("Save Employee details");
buildEmployeeDetails().add(employee);
employees.forEach(System.out::println);
//System.out.println(employee.toString());
}
@RequestMapping("/getEmployeeDetails")
public void getmployeeDetails(@RequestParam String employeeName) {
//System.out.println("employeeName = " + employeeName);
List<Employee> employeeList = buildEmployeeDetails().stream()
.filter(employee -> employee.getEmpName().equalsIgnoreCase(employeeName))
.collect(Collectors.toList());
employeeList.forEach(System.out::println);
// System.out.println(employeeName);
}
private List<Employee> buildEmployeeDetails() {
IntStream.range(1, 100).forEach(
value -> {
employees.add(new Employee("employee" + value, 1000 * value));
}
);
return employees;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment