Merge branch 'RB' into current
# Conflicts: # .gitignore # pom.xml # src/main/java/com/ossez/lang/tutorial/overview/HelloWorld.java
This commit is contained in:
@@ -3,16 +3,36 @@ package com.ossez.lang.tutorial.overview;
|
||||
/**
|
||||
* Java Tutorial
|
||||
*
|
||||
<<<<<<< HEAD
|
||||
* This is my first java program. This will print 'Hello World' as the output This is an example of multi-line comments
|
||||
*
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
* This is my first java program. This will print 'Hello World' as the output This is an example of multi-line comments
|
||||
*
|
||||
>>>>>>> 361e407d91e00158295aadeaca0a91d84a534820
|
||||
>>>>>>> RB
|
||||
* @author YuCheng
|
||||
*
|
||||
*/
|
||||
public class HelloWorld {
|
||||
public static void main(String[] args) {
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
<<<<<<< HEAD
|
||||
System.out.println("Hello World");
|
||||
}
|
||||
}
|
||||
=======
|
||||
>>>>>>> RB
|
||||
// This is an example of single line comment
|
||||
/* This is also an example of single line comment. */
|
||||
|
||||
System.out.println("Hello World");
|
||||
}
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 361e407d91e00158295aadeaca0a91d84a534820
|
||||
>>>>>>> RB
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>CORS TESTING</title>
|
||||
<!-- Required meta tags -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<!-- Bootstrap CSS -->
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<h1>CORS TESTING</h1>
|
||||
<!-- Content here -->
|
||||
<p class="text-left">Update to your target API address:</p>
|
||||
<input type="text" style="width:600px;height:30px;font-size:14px;" id="urlText" value="http://localhost:8080/search/user"/>
|
||||
<p>
|
||||
<p/>
|
||||
<p class="text-left">Update to your Bearer Token:</p>
|
||||
<input type="text" style="width:600px;height:30px;font-size:14px;" id="tokenTxt" value=""/>
|
||||
<p>
|
||||
<p/>
|
||||
<input type="button" class="btn btn-outline-primary" id="cors" value="CHECK CORS"/>
|
||||
</div>
|
||||
<!-- Optional JavaScript -->
|
||||
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
|
||||
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#cors").on('click', function (event) {
|
||||
event.preventDefault();
|
||||
var url2 = $("#urlText").val();
|
||||
$.get({
|
||||
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||
url: url2,
|
||||
beforeSend: function (xhr) {
|
||||
|
||||
if ($("#tokenTxt").val().trim()) {
|
||||
/* Authorization header */
|
||||
xhr.setRequestHeader("Authorization", "Bearer " + $("#tokenTxt").val());
|
||||
}
|
||||
},
|
||||
|
||||
success: function (data) {
|
||||
alert("success");
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
Jill,Doe
|
||||
Joe,Doe
|
||||
Justin,Doe
|
||||
Jane,Doe
|
||||
John,Doe
|
||||
YuCheng,HU
|
||||
|
@@ -0,0 +1,7 @@
|
||||
DROP TABLE people IF EXISTS;
|
||||
|
||||
CREATE TABLE people (
|
||||
person_id BIGINT IDENTITY NOT NULL PRIMARY KEY,
|
||||
first_name VARCHAR(20),
|
||||
last_name VARCHAR(20)
|
||||
);
|
||||
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
cd $(dirname $0)
|
||||
|
||||
cd ../complete
|
||||
|
||||
mvn clean package
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
exit $ret
|
||||
fi
|
||||
rm -rf target
|
||||
|
||||
./gradlew build
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
exit $ret
|
||||
fi
|
||||
rm -rf build
|
||||
|
||||
cd ../initial
|
||||
|
||||
mvn clean compile
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
exit $ret
|
||||
fi
|
||||
rm -rf target
|
||||
|
||||
./gradlew compileJava
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]; then
|
||||
exit $ret
|
||||
fi
|
||||
rm -rf build
|
||||
|
||||
exit
|
||||
Reference in New Issue
Block a user