diff --git a/.gitignore b/.gitignore
index e5aa5b3c6b6ccf9be109bb685652e4af0b72b241..5201bbfb2bf7e0c2c56cbf9f849ada7d7c0c48ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.idea
*.iml
-target
\ No newline at end of file
+target
+.log
\ No newline at end of file
diff --git a/README.md b/README.md
index 61b61396852f84635aff8614514b084061d68017..8bcfaee63577acb11227bb6b922beb22019a4583 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,10 @@ zheng
| ├── qa-dao
| ├── qa-service
| └── qa-web
+├── upms 通用用户权限系统
+| ├── upms-dao
+| ├── upms-service
+| └── upms-admin
├── pay 支付系统
| ├── pay-service
| ├── pay-sdk
@@ -28,10 +32,6 @@ zheng
| └── wechat-app 小程序
| ├── wechat-app-sdk
| └── wechat-app-example
-├── upms 通用用户权限系统
-| ├── upms-dao
-| ├── upms-service
-| └── upms-admin
├── api 接口系统
└── oss 对象存储系统
├── oss-sdk
diff --git a/springboot/pom.xml b/springboot/pom.xml
index 3833ac1d10e0d90116b13a0cccc3072923e5e434..85bd9368830c00581c0ca1ec4ea38604d4b62e1f 100644
--- a/springboot/pom.xml
+++ b/springboot/pom.xml
@@ -83,11 +83,6 @@
org.springframework.boot
spring-boot-starter-redis
-
-
- org.springframework.boot
- spring-boot-starter-data-mongodb
-
diff --git a/springboot/src/main/java/com/zheng/springboot/web/HelloController.java b/springboot/src/main/java/com/zheng/springboot/web/HelloController.java
index 6edd7bfd5c9fc0a59edb66bfaaae946bab97adeb..393308e9f899b00294f669da1892a08212c13777 100644
--- a/springboot/src/main/java/com/zheng/springboot/web/HelloController.java
+++ b/springboot/src/main/java/com/zheng/springboot/web/HelloController.java
@@ -1,5 +1,6 @@
package com.zheng.springboot.web;
+import com.zheng.springboot.domain.User;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
@@ -7,6 +8,9 @@ import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
+import java.util.ArrayList;
+import java.util.List;
+
/**
* Created by ZhangShuzheng on 2016/11/16.
*/
@@ -15,9 +19,21 @@ public class HelloController {
@ApiOperation(value="测试首页", notes="测试首页get请求")
@ApiImplicitParam(name = "map", value = "ModelMap实体map", required = false, dataType = "ModelMap")
- @RequestMapping(value = "/index", method = RequestMethod.GET)
+ @RequestMapping(value = "/hello", method = RequestMethod.GET)
public String index(ModelMap map) {
map.addAttribute("host", "http://www.zhangshuzheng.cn");
+ List users = new ArrayList<>();
+ User user = new User();
+ user.setId(null);
+ user.setAge(11);
+ user.setName("");
+ users.add(user);
+ user = new User();
+ user.setId(2l);
+ user.setAge(22);
+ user.setName("lisi");
+ users.add(user);
+ map.addAttribute("users", users);
return "/index";
}
diff --git a/springboot/src/main/resources/application-dev.properties b/springboot/src/main/resources/application-dev.properties
new file mode 100644
index 0000000000000000000000000000000000000000..baede6366492f90aa877e8a92827799f045bd27a
--- /dev/null
+++ b/springboot/src/main/resources/application-dev.properties
@@ -0,0 +1 @@
+profile.env=dev
\ No newline at end of file
diff --git a/springboot/src/main/resources/application-prod.properties b/springboot/src/main/resources/application-prod.properties
new file mode 100644
index 0000000000000000000000000000000000000000..bb7a8fdfe74ddbc5c9bd743c81ff7d541d7c45ee
--- /dev/null
+++ b/springboot/src/main/resources/application-prod.properties
@@ -0,0 +1 @@
+profile.env=prod
\ No newline at end of file
diff --git a/springboot/src/main/resources/application-test.properties b/springboot/src/main/resources/application-test.properties
new file mode 100644
index 0000000000000000000000000000000000000000..4ff006f4ecdaee2b79a767c9eee687ad427c1506
--- /dev/null
+++ b/springboot/src/main/resources/application-test.properties
@@ -0,0 +1 @@
+profile.env=test
\ No newline at end of file
diff --git a/springboot/src/main/resources/application.properties b/springboot/src/main/resources/application.properties
index 6b5ef92c3c386d8389c40afe1982e3d5b1b2b750..baad1508987e98590316432d2fc6ff619fd91298 100644
--- a/springboot/src/main/resources/application.properties
+++ b/springboot/src/main/resources/application.properties
@@ -1,3 +1,6 @@
+########## ##########
+spring.profiles.active=dev
+evn=${profile.env}
########## Դ ##########
#spring.datasource.url=jdbc:mysql://localhost:3306/zheng
#spring.datasource.username=root
diff --git a/springboot/src/main/resources/templates/index.html b/springboot/src/main/resources/templates/index.html
index e8bd4618be9a05ac8dc7f566a70d3f9899bff418..abc0342e035251f6a3b3f9b56f20be8dbb23ca92 100644
--- a/springboot/src/main/resources/templates/index.html
+++ b/springboot/src/main/resources/templates/index.html
@@ -1,10 +1,16 @@
-
+
Hello World
+
\ No newline at end of file
diff --git a/springboot/src/test/java/com/zheng/SpringbootApplicationTests.java b/springboot/src/test/java/com/zheng/SpringbootApplicationTests.java
index 762558c9714f72bef61f60d6c289e74c5603ca48..8509c9f338b34a3d169f80c2c550751125cb1c98 100644
--- a/springboot/src/test/java/com/zheng/SpringbootApplicationTests.java
+++ b/springboot/src/test/java/com/zheng/SpringbootApplicationTests.java
@@ -1,7 +1,6 @@
package com.zheng;
import com.zheng.springboot.SpringbootApplication;
-import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -20,8 +19,8 @@ public class SpringbootApplicationTests {
public void contextLoads() {
System.out.println("=============================== redis start ===============================");
// 保存字符串
- stringRedisTemplate.opsForValue().set("aaa", "111");
- Assert.assertEquals("111", stringRedisTemplate.opsForValue().get("aaa"));
+// stringRedisTemplate.opsForValue().set("aaa", "111");
+// Assert.assertEquals("111", stringRedisTemplate.opsForValue().get("aaa"));
System.out.println("=============================== redis end ===============================");
}