栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

IDEA简单实现登录注册页面

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

IDEA简单实现登录注册页面

application.yml

spring:
 datasource:
  username: root
  password: 123456
  url: jdbc:mysql://localhost:3306/bd1906?serverTimezone=GMT%2B8
  driver-class-name: com.mysql.cj.jdbc.Driver
server:
  port: 8080

Controller层

@Controller
public class loginController {

  @Autowired
  private JdbcTemplate jdbcTemplate;

  @RequestMapping("/index")
  public String border(){
    return "/index.html";
  }

  @RequestMapping("/login")
  public String getUserFront(){
    return "/login.html";
  }

  @RequestMapping(value = "/log",method = RequestMethod.POST)
  @ResponseBody
  public String log(String name,String psd){
    String sql = "select * from user where username = '"+ name +"' and password = '"+psd+"'";
    List> list = jdbcTemplate.queryForList(sql);
    if(list.size() == 0){
      return "0";
    }
    else{
      return "1";
    }
  }
}

登录页面




  
  
  login
  
    html,body{
      width: 100%;height: 100%;margin: 0;padding: 0;
    }
    body{
      background-image: url('./img/bg1.jpg');
      background-size: 100% 100%;
      background-repeat: no-repeat;
    }
    
    .head{color: whitesmoke;font-size: 30px;text-align: center;margin-top: 10px;margin-bottom: 10px;}
    
    .cutter{text-align: center;margin-bottom: 10px;}
    body .login_fields {
      margin-top: 40px;
      margin-left: 45%;
      height: 208px;
      position: absolute;
      left: 0;
    }
    body .login_fields .icon {
      position: absolute;
      z-index: 1;
      left: 36px;
      top: 8px;
      opacity: .5;
    }
    body .login_fields input[type='password'],body .login_fields input[type='text'] {
      color: #61BFFF !important;
    }
    body .login_fields input[type='text'], body .login_fields input[type='password'] {
      color: #afb1be;
      width: 190px;
      margin-top: -2px;
      background: rgba(57, 61, 82, 0);
      left: 0;
      padding: 10px 65px;
      border-top: 2px solid rgba(57, 61, 82, 0);
      border-bottom: 2px solid rgba(57, 61, 82, 0);
      border-right: none;
      border-left: none;
      outline: none;
      font-family: 'Gudea', sans-serif;
      box-shadow: none;
    }
    body .login_fields__user, body .login_fields__password {
      position: relative;
    }
    body .login_fields__submit {
      position: relative;
      top: 17px;
      left: 0;
      width: 80%;
      right: 0;
      margin: auto;
    }
    body .login_fields__submit .forgot a {
      color: #606479;
    }
    body .login_fields__submit input {
      border-radius: 50px;
      background: transparent;
      padding: 10px 50px;
      border: 2px solid #4FA1D9;
      color: #4FA1D9;
      text-transform: uppercase;
      font-size: 11px;
      -webkit-transition-property: background,color;
      transition-property: background,color;
      -webkit-transition-duration: .2s;
      transition-duration: .2s;
    }
    body .login_fields__submit input:focus {
      box-shadow: none;
      outline: none;
    }
    body .login_fields__submit input:hover {
      color: white;
      background: #4FA1D9;
      cursor: pointer;
      -webkit-transition-property: background,color;
      transition-property: background,color;
      -webkit-transition-duration: .2s;
      transition-duration: .2s;
    }
  



  智能互联装备协同管理平台


  


  
    
      
    
    
  
  
    
      
    
    
  
  
    
  




到此这篇关于IDEA简单实现登录注册页面的文章就介绍到这了,更多相关idea实现登录页面内容请搜索考高分网以前的文章或继续浏览下面的相关文章希望大家以后多多支持考高分网!

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/129789.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号