• 大小: 730KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: Java
  • 标签: spark  mongodb  spring  maven  

资源简介

这个主要是spark 用JAVA语言连接mysql , mongodb 数据库的 CRUD 例子;附件有运行使用的截图,运行入口在Test目录的测试用例;仅供参考!

资源截图

代码片段和文件信息

package com.harleycorp.controler;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.harleycorp.pojo.User;
import com.harleycorp.service.IUserService;

@Controller
@RequestMapping(“/user“)
public class UserController {
@Resource
private IUserService userService;

@RequestMapping(“/showUser“)
public String toIndex(HttpServletRequest requestModel model){
int userId = Integer.parseInt(request.getParameter(“id“));
User user = this.userService.getUserById(userId);
model.addAttribute(“user“ user);
return “showUser“;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-09-12 16:02  sparkjava20170912\
     文件       75631  2017-09-12 15:45  sparkjava20170912\1.png
     文件       95994  2017-09-12 15:45  sparkjava20170912\2.png
     文件       66926  2017-09-12 15:46  sparkjava20170912\3.png
     文件      115885  2017-09-12 15:46  sparkjava20170912\4.png
     文件       98545  2017-09-12 15:48  sparkjava20170912\5.png
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\
     文件         608  2017-09-12 11:22  sparkjava20170912\dingtalk\.classpath
     文件         669  2017-09-12 11:22  sparkjava20170912\dingtalk\.project
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\.settings\
     文件         205  2017-09-12 11:22  sparkjava20170912\dingtalk\.settings\org.eclipse.core.resources.prefs
     文件         243  2017-09-12 11:22  sparkjava20170912\dingtalk\.settings\org.eclipse.jdt.core.prefs
     文件         218  2017-07-27 10:10  sparkjava20170912\dingtalk\.settings\org.maven.ide.eclipse.prefs
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\docs\
     文件         958  2017-09-07 16:45  sparkjava20170912\dingtalk\docs\dingtalk.user_t.sql
     文件        1098  2017-09-07 16:45  sparkjava20170912\dingtalk\docs\spark.testtable.sql
     文件       15390  2017-09-07 16:45  sparkjava20170912\dingtalk\docs\ssh-spark.docx
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\logs\
     文件     2805526  2017-09-12 16:01  sparkjava20170912\dingtalk\logs\ssm.log
     文件        6753  2017-09-12 15:25  sparkjava20170912\dingtalk\pom.xml
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\com\
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\controler\
     文件         753  2017-07-27 10:01  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\controler\UserController.java
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\dao\
     文件         354  2017-07-27 10:01  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\dao\UserMapper.java
     目录           0  2017-09-12 16:02  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\pojo\
     文件         612  2017-09-08 10:26  sparkjava20170912\dingtalk\src\main\java\com\harleycorp\pojo\SparkUser.java
............此处省略36个文件信息

评论

共有 条评论