当前位置:网站首页>第3章业务功能开发(用户访问项目)
第3章业务功能开发(用户访问项目)
2022-07-07 15:39:00 【做一道光】
3.1首页功能
用户访问项目首页,首先进入登录页面。
首先明确需求,规划程序访问流程,画好UML顺序图再编写代码,方便以后对项目进行管理,同时也是开发规范的硬性要求
我使用的是processOn在线编译网站,当然也可以使用star uml,Rational Rose ,Rational Rose 的下载破解流程连接如下点这里 。
项目结构
运行tomcat
1.IndexController类
package com.it.crm.web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class IndexController {
/*
理论上,给Controller分配url:http://127.0.0.1:8080/crm/
为了简便,框架规定省去 协议名://ip:port/项目名称,用/直接代表上面的url,即到达根目录
*/
@RequestMapping(value = "/")
public String index(){
return "index";
}
}
2.进入标记蓝色阴影的index.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<script type="text/javascript">
window.location.href = "settings/qx/user/toLogin.do";
</script>
</body>
</html>
3.跳转到UserController
package com.it.crm.settings.web.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class UserController {
@RequestMapping(value = "/settings/qx/user/toLogin.do")
public String toLogin(){
return "settings/qx/user/login";
}
}
4.进入登录界面
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String basePath=request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+"/"+request.getContextPath()+"/";
%>
<html>
<head>
<meta charset="UTF-8">
<base href="<%=basePath%>">
<link href="jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div style="position: absolute; top: 0px; left: 0px; width: 60%;">
<img src="image/IMG_7114.JPG" style="width: 100%; height: 90%; position: relative; top: 50px;">
</div>
<div id="top" style="height: 50px; background-color: #3C3C3C; width: 100%;">
<div style="position: absolute; top: 5px; left: 0px; font-size: 30px; font-weight: 400; color: white; font-family: 'times new roman'">CRM <span style="font-size: 12px;">©2019 动力节点</span></div>
</div>
<div style="position: absolute; top: 120px; right: 100px;width:450px;height:400px;border:1px solid #D5D5D5">
<div style="position: absolute; top: 0px; right: 60px;">
<div class="page-header">
<h1>登录</h1>
</div>
<form action="workbench/index.html" class="form-horizontal" role="form">
<div class="form-group form-group-lg">
<div style="width: 350px;">
<input class="form-control" type="text" placeholder="用户名">
</div>
<div style="width: 350px; position: relative;top: 20px;">
<input class="form-control" type="password" placeholder="密码">
</div>
<div class="checkbox" style="position: relative;top: 30px; left: 10px;">
<label>
<input type="checkbox"> 十天内免登录
</label>
<span id="msg"></span>
</div>
<button type="submit" class="btn btn-primary btn-lg btn-block" style="width: 350px; position: relative;top: 45px;">登录</button>
</div>
</form>
</div>
</div>
</body>
</html>
边栏推荐
- [Seaborn] implementation of combined charts and multi subgraphs
- 【饭谈】那些看似为公司着想,实际却很自私的故事 (一:造轮子)
- Test case management tool recommendation
- 【黄啊码】为什么我建议您选择go,而不选择php?
- Matplotlib绘图界面设置
- 麒麟信安中标国网新一代调度项目!
- The mail server is listed in the blacklist. How to unblock it quickly?
- 【网络攻防原理与技术】第3章:网络侦察技术
- [image sensor] correlated double sampling CDs
- LeetCode1051(C#)
猜你喜欢
Devops' operational and commercial benefits Guide
如何在博客中添加Aplayer音乐播放器
Skimage learning (1)
Sator launched Web3 game "satorspace" and launched hoobi
PLC:自动纠正数据集噪声,来洗洗数据集吧 | ICLR 2021 Spotlight
赋能智慧电力建设 | 麒麟信安高可用集群管理系统,保障用户关键业务连续性
Sator a lancé le jeu web 3 "satorspace" et a lancé huobi
【TPM2.0原理及应用指南】 12、13、14章
99%的人都不知道|私有化部署还永久免费的即时通讯软件!
让保险更“保险”!麒麟信安一云多芯云桌面中标中国人寿, 助力金融保险信息技术创新发展
随机推荐
Shallow understanding Net core routing
SlashData开发者工具榜首等你而定!!!
Siggraph 2022 best technical paper award comes out! Chen Baoquan team of Peking University was nominated for honorary nomination
LeetCode 152. Product maximum subarray daily question
Biped robot controlled by Arduino
LeetCode 312. Poke balloon daily
Sator推出Web3遊戲“Satorspace” ,並上線Huobi
LeetCode 1155. N ways to roll dice one question per day
Sator launched Web3 game "satorspace" and launched hoobi
如何在软件研发阶段落地安全实践
浅谈 Apache Doris FE 处理查询 SQL 源码解析
Skimage learning (2) -- RGB to grayscale, RGB to HSV, histogram matching
Flask搭建api服务-SQL配置文件
With the latest Alibaba P7 technology system, mom doesn't have to worry about me looking for a job anymore
The mail server is listed in the blacklist. How to unblock it quickly?
PLC: automatically correct the data set noise, wash the data set | ICLR 2021 spotlight
[Huang ah code] Why do I suggest you choose go instead of PHP?
redis主从、哨兵主备切换搭建一步一步图解实现
The server is completely broken and cannot be repaired. How to use backup to restore it into a virtual machine without damage?
麒麟信安加入宁夏商用密码协会