parent
5d48f4fd80
commit
d7c9ca6cd0
@ -1,15 +0,0 @@
|
|||||||
package com.example.demo;
|
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
|
|
||||||
@SpringBootApplication
|
|
||||||
//@MapperScan("com.example.demo.Dao")
|
|
||||||
public class DemoApplication {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(DemoApplication.class, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.demo.userInfo.controller;
|
package com.example.demo.userCenter.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.example.demo.bean.User;
|
import com.example.demo.bean.User;
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.example.demo.userCenter.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.example.demo.bean.User;
|
||||||
|
import com.example.demo.loginService.API.impl.UserService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
|
import javax.servlet.ServletException;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class personInforController {
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
@RequestMapping(value = "/ix",method = RequestMethod.POST)//个人详情页面
|
||||||
|
public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException {
|
||||||
|
response.setContentType("text/html;charset=utf-8");
|
||||||
|
HttpSession session = request.getSession();
|
||||||
|
User user= (User)session.getAttribute("user");
|
||||||
|
User user2 =userService.selectUserByuserName(user.getUserName());
|
||||||
|
String data = JSONObject.toJSONString(user2);
|
||||||
|
response.getWriter().print(data);
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package com.example.demo.userInfo.service;
|
package com.example.demo.userCenter.service;
|
||||||
|
|
||||||
import com.example.demo.bean.User;
|
import com.example.demo.bean.User;
|
||||||
|
|
@ -1,8 +1,8 @@
|
|||||||
package com.example.demo.userInfo.service.impl;
|
package com.example.demo.userCenter.service.impl;
|
||||||
|
|
||||||
import com.example.demo.bean.User;
|
import com.example.demo.bean.User;
|
||||||
import com.example.demo.Dao.userMapper;
|
import com.example.demo.Dao.userMapper;
|
||||||
import com.example.demo.userInfo.service.UserInfoService;
|
import com.example.demo.userCenter.service.UserInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/soft?serverTimezone=GMT%2B8
|
||||||
|
spring.datasource.username=root
|
||||||
|
spring.datasource.password=123456789
|
||||||
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
|
#spring.datasource.max-idle=10
|
||||||
|
#spring.datasource.max-wait=10000
|
||||||
|
#spring.datasource.min-idle=5
|
||||||
|
#spring.datasource.initial-size=5
|
||||||
|
|
@ -1,14 +1,14 @@
|
|||||||
spring:
|
#spring:
|
||||||
mvc:
|
# mvc:
|
||||||
view:
|
# view:
|
||||||
prefix:
|
# prefix:
|
||||||
suffix: .html
|
# suffix: .html
|
||||||
datasource:
|
# datasource:
|
||||||
url: jdbc:mysql://localhost:3306/finance?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://127.0.0.1:3306/soft?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
|
||||||
username: root
|
# username: root
|
||||||
password: root1234
|
# password:
|
||||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
# driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
mybatis:
|
#mybatis:
|
||||||
type-aliases-package: com.example.demo.Dao
|
# type-aliases-package: com.example.demo.Dao
|
||||||
#server:
|
##server:
|
||||||
# path: 80
|
## path: 80
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue