diff --git a/SpringBootController/src/main/resources/static/test.html b/SpringBootController/src/main/resources/static/test.html index 7e7255d..b24be38 100644 --- a/SpringBootController/src/main/resources/static/test.html +++ b/SpringBootController/src/main/resources/static/test.html @@ -28,6 +28,66 @@ $("#t1").click(function(){ alert("Data Loaded: " + data.rs); }); }) + + $("#t2").click(function(){ + $.get("test/t2?p1=jerry", function(data){ + alert("Data Loaded: " + data.rs); + }); + }) + + + $("#t3").click(function(){ + var data = {"name" :"petter","pwd" : "123"} + $.ajax({ + url : "test/t3", + async : false, + type : "POST", + contentType : 'application/json', + dataType : 'json', + data :JSON.stringify(data), + success : function(data) { + alert("Data Loaded: " + data.rs); + } + }); + }) + $("#t4").click(function(){ + var data = {"name" :"petter","pwd" : "123"} + $.ajax({ + url : "test/t4?name=jacky", + async : false, + type : "POST", + contentType : 'form-data', + success : function(data) { + alert("Data Loaded: " + data.rs); + } + }); + }) +// 暂时不通 + $("#t5").click(function(){ + var data = {"name" :"petter","pwd" : "123"} + $.ajax({ + url : "test/t5", + async : false, + type : "POST", + contentType : 'application/json', + dataType : 'json', + headers: { + + 'Header':"from header", + 'Cookie':'sdfs' + }, + data :JSON.stringify(data), + success : function(data) { + alert("Data Loaded: " + data.rs); + } + }); + }) + $("#t6").click(function(){ + $.get("test/t6?name=jerry&pwd=234", function(data){ + alert("Data Loaded: " + data.rs); + }); + }) + }); diff --git a/SpringBootLombok/SpringBootLombok.iml b/SpringBootLombok/SpringBootLombok.iml new file mode 100644 index 0000000..053703a --- /dev/null +++ b/SpringBootLombok/SpringBootLombok.iml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SpringBootLombok/pom.xml b/SpringBootLombok/pom.xml new file mode 100644 index 0000000..c2641d1 --- /dev/null +++ b/SpringBootLombok/pom.xml @@ -0,0 +1,57 @@ + + + + SpringBoot2 + zz + 0.0.1-SNAPSHOT + + 4.0.0 + + SpringBootLombok + + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-devtools + true + + + + + mysql + mysql-connector-java + 8.0.15 + + + org.projectlombok + lombok + 1.18.6 + provided + + + + + + alimaven + aliyun maven + http://maven.aliyun.com/nexus/content/groups/public/ + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + \ No newline at end of file diff --git a/SpringBootLombok/src/main/resources/logback-spring.xml b/SpringBootLombok/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..e8d95a9 --- /dev/null +++ b/SpringBootLombok/src/main/resources/logback-spring.xml @@ -0,0 +1,57 @@ + + + + logback + + + + + + + + + + + + + INFO + + + + ${LOG_PATTERN} + + + + + + + + + ${FILE_PATH} + + + 30 + + + + 2MB + + + + 1GB + + + + ${LOG_PATTERN} + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 43ad0ff..09da3c9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ SpringBootSwagger2 SpringBootShiroRememberMe SpringBootController + SpringBootLombok