vue+springboot实验个人信息,修改密码,忘记密码功能实现

前端部分

新增Person(个人页面),Password(修改密码页面),还需要对Manager,login页面进行修改

router文件夹下的index.js:

 

import Vue from 'vue'
import VueRouter from 'vue-router'
import Manager from '../views/Manager.vue'
// 解决导航栏或者底部导航tabBar中的vue-router在3.0版本以上频繁点击菜单报错的问题。
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'manager',
    component: Manager,
    children:[
      {path:'home',name:'Home',meta:{ name:'系统首页' },component:()=>import('../views/manager/Home.vue')},
      {
        path:'user',name:'User',meta:{ name:'用户信息' },component:()=>import('../views/manager/User.vue')
      },
      {
        path:'403',name:'Auth',meta:{ name:'无权限' },component:()=>import('../views/Auth.vue')
      },
      {
        path:'Person',name:'person',meta:{ name:'个人信息' },component:()=>import('../views/manager/Person.vue')
      },
      {
        path:'Password',name:'password',meta:{ name:'修改密码' },component:()=>import('../views/manager/Password.vue')
      }
    ],
    redirect:'/home'
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path:'/login',
    name:'login',
    meta:{ name:'登录' },
    component: ()=>import('../views/login.vue')
  },
  {
    path:'/register',
    name:'register',
    meta:{ name:'注册' },
    component: ()=>import('../views/register.vue')
  },
  {
    path:'*',
    name:'404',
    meta:{ name:'无法访问' },
    component: ()=>import('../views/404.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})
router.beforeEach((to,from,next)=>{
  let adminPaths=['/user']
  let user=JSON.parse(localStorage.getItem('honey-user')||'{}')
  if(user.role !== '管理员' && adminPaths.includes(to.path)){
    next('/403')
  }else{
    next()
  }
})
export default router

Person.vue

<template>
  <div>
    <el-card style="width: 50%">
      <el-form :model="user" label-width="80px" style="padding-right: 20px">
        <div style="margin: 15px;text-align: center">
          <el-upload
              class="avatar-uploader"
              action="http://localhost:9090/file/upload"
              :headers="{ token: user.token }"
              :show-file-list="false"
              :on-success="handleAvatarSuccess">
            <img v-if="user.avatar" :src="user.avatar" class="avatar">
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </div>
        <el-form-item label="用户名" prop="username">
          <el-input v-model="user.username" disabled></el-input>
        </el-form-item>
        <el-form-item label="姓名" prop="name">
          <el-input v-model="user.name"></el-input>
        </el-form-item>
        <el-form-item label="电话" prop="phone">
          <el-input v-model="user.phone"></el-input>
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
          <el-input v-model="user.email"></el-input>
        </el-form-item>
        <el-form-item label="地址" prop="address">
          <el-input type="textarea" v-model="user.address"></el-input>
        </el-form-item>
      </el-form>
      <div style="text-align: center;margin-bottom: 20px"><el-button type="primary" @click="update">保存</el-button></div>
    </el-card>
  </div>
</template>

<script>
export default {
  data(){
    return{
      user:JSON.parse(localStorage.getItem('honey-user'||'{}'))
    }
  },
  methods:{
    update(){
      this.$request.put('/user/update',this.user).then(res=>{
        if(res.code==='200'){
          this.$message.success('保存成功')
          localStorage.setItem('honey-user',JSON.stringify(this.user))
          this.$emit('update:user',this.user)
        }else{
          this.$message.error(res.msg)
        }
      })
    },
    handleAvatarSuccess(response,file,fileList){
      console.log(response)
      this.user.avatar=response.data
    }
  }
}
</script>

<style scoped>
/deep/.el-form-item__label{
  font-weight: bold;
}
/deep/.el-upload{
  border-radius: 50%;
}
/deep/.avatar-uploader .el-upload {
  border: 1px dashed #d9d9d9;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 50%;
}
/deep/.avatar-uploader .el-upload:hover {
  border-color: #409EFF;
}
.avatar-uploader-icon {
  font-size: 28px;
  color: #8c939d;
  width: 178px;
  height: 178px;
  line-height: 178px;
  text-align: center;
  border-radius: 50%;
}
.avatar {
  width: 178px;
  height: 178px;
  display: block;
  border-radius: 50%;
}
</style>

Password.vue:

<template>
  <div>
    <el-card style="width: 50%">
      <el-form ref="fromRef" :model="user" label-width="80px" style="padding-right: 20px" :rules="rules">
        <el-form-item label="原始密码" prop="password">
          <el-input v-model="user.password" show-password></el-input>
        </el-form-item>
        <el-form-item label="新密码" prop="newPassword">
          <el-input v-model="user.newPassword"></el-input>
        </el-form-item>
        <el-form-item label="确认密码" prop="confirmPassword">
          <el-input v-model="user.confirmPassword"></el-input>
        </el-form-item>
        <div style="text-align: center;margin-bottom: 20px"><el-button type="primary" @click="update">确认修改</el-button></div>
      </el-form>
    </el-card>
  </div>
</template>

<script>
export default {
  data(){
    const validatePassword = (rule, value, callback) => {
      if (value === '') {
        callback(new Error('请输入确认密码'));
      } else if(value !== this.user.newPassword){
        callback(new Error('两次密码不一致'));
      } else {
        callback();
      }
    };
    return{
      user:JSON.parse(localStorage.getItem('honey-user'||'{}')),
      rules:{
        password:[{
          required:true,
          message:'请输入原始密码',
          trigger:'blur'
        }],
        newPassword:[{
          required:true,
          message:'请输入新密码',
          trigger:'blur'
        }],
        confirmPassword:[{
          validator:validatePassword,
          required:true,
          trigger:'blur',
        }]
      }
    }
  },
  methods:{
    update(){
      this.$refs.fromRef.validate((valid)=>{
        if(valid){
          this.user.password=this.user.newPassword
          this.$request.put('/user/update',this.user).then(res=>{
            if(res.code==='200'){
              this.$message.success('保存成功')
              this.$router.push('/login')
            }else{
              this.$message.error(res.msg)
            }
          })
        }
      })
    },
  }
}
</script>

<style scoped>
/deep/.el-form-item__label{
  font-weight: bold;
}
</style>

 Manager.vue:

<template>
  <div>
    <el-container>
      <!--    侧边栏  -->
      <el-aside :width="asideWidth" style="min-height: 100vh; background-color: #001529">
        <div style="height: 60px; color: white; display: flex; align-items: center; justify-content: center">
          <img src="@/assets/logo1.png" alt="" style="width: 40px; height: 40px">
          <span class="logo-title" v-show="!isCollapse">honey2024</span>
        </div>

        <el-menu :collapse="isCollapse" :collapse-transition="false" router background-color="#001529" text-color="rgba(255, 255, 255, 0.65)" active-text-color="#fff" style="border: none" :default-active="$route.path">
          <el-menu-item index="/home">
            <i class="el-icon-s-home"></i>
            <span slot="title">系统首页</span>
          </el-menu-item>
          <el-submenu index="info" v-if="user.role === '管理员'">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>信息管理</span>
            </template>
            <el-menu-item index="/user">用户信息</el-menu-item>
          </el-submenu>
        </el-menu>

      </el-aside>

      <el-container>
        <!--        头部区域-->
        <el-header>

          <i :class="collapseIcon" style="font-size: 26px" @click="handleCollapse"></i>
          <el-breadcrumb separator-class="el-icon-arrow-right" style="margin-left: 20px">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item :to="{ path: $route.path }">{{ $route.meta.name }}</el-breadcrumb-item>
          </el-breadcrumb>

          <div style="flex: 1; width: 0; display: flex; align-items: center; justify-content: flex-end">
            <i class="el-icon-quanping" style="font-size: 26px" @click="handleFull"></i>
            <el-dropdown placement="bottom">
              <div style="display: flex; align-items: center; cursor: default">
                <img :src="user.avatar||'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'" alt="" style="width: 40px; height: 40px; margin: 0 5px;border-radius: 50%">
                <span>{{user.name}}</span>
              </div>
              <el-dropdown-menu slot="dropdown">
                <el-dropdown-item @click.native="$router.push('/person')">个人信息</el-dropdown-item>
                <el-dropdown-item @click.native="$router.push('/password')">修改密码</el-dropdown-item>
                <el-dropdown-item @click.native="logout">退出登录</el-dropdown-item>
              </el-dropdown-menu>
            </el-dropdown>
          </div>

        </el-header>

        <!--        主体区域-->
        <el-main>
          <router-view @update:user="updateUser"></router-view>
        </el-main>

      </el-container>


    </el-container>
  </div>
</template>

<script>
import axios from "axios";
import request from '@/utils/request'

export default {
  name: 'HomeView',
  data() {
    return {
      isCollapse: false,  // 不收缩
      asideWidth: '200px',
      collapseIcon: 'el-icon-s-fold',
      user:JSON.parse(localStorage.getItem('honey-user')||'{}'),
    }
  },
  mounted() {
    // axios.get('http://localhost:9090/user/selectall').then(res=>{
    //   console.log(res.data);
    //   this.users=res.data.data
    // })

    // request.get('/user/selectall').then(res => {
    //   this.users = res.data
    // })
  },
  methods: {
    updateUser(user){
      this.user=JSON.parse(JSON.stringify(user))
    },
    handleFileUpload(response,file,fileList){
      this.fileList=fileList
      console.log(response,file,fileList)
    },
    logout() {
      localStorage.removeItem("honey-user")
      this.$router.push('/login')
    },
    handleFull() {
      document.documentElement.requestFullscreen()
    },
    handleCollapse() {
      this.isCollapse = !this.isCollapse
      this.asideWidth = this.isCollapse ? '64px' : '200px'
      this.collapseIcon = this.isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'
    }
  }
}
</script>

<style>
.el-menu--inline {
  background-color: #000c17 !important;
}

.el-menu--inline .el-menu-item {
  background-color: #000c17 !important;
  padding-left: 49px !important;
}

.el-menu-item:hover, .el-submenu__title:hover {
  color: #fff !important;
}

.el-submenu__title:hover i {
  color: #fff !important;
}

.el-menu-item:hover i {
  color: #fff !important;
}

.el-menu-item.is-active {
  background-color: #1890ff !important;
  border-radius: 5px !important;
  width: calc(100% - 8px);
  margin-left: 4px;
}

.el-menu-item.is-active i, .el-menu-item.is-active .el-tooltip {
  margin-left: -4px;
}

.el-menu-item {
  height: 40px !important;
  line-height: 40px !important;
}

.el-submenu__title {
  height: 40px !important;
  line-height: 40px !important;
}

.el-submenu .el-menu-item {
  min-width: 0 !important;
}

.el-menu--inline .el-menu-item.is-active {
  padding-left: 45px !important;
}

/*.el-submenu__icon-arrow {*/
/*  margin-top: -5px;*/
/*}*/

.el-aside {
  transition: width .3s;
  box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
}

.logo-title {
  margin-left: 5px;
  font-size: 20px;
  transition: all .3s; /* 0.3s */
}

.el-header {
  box-shadow: 2px 0 6px rgba(0, 21, 41, .35);
  display: flex;
  align-items: center;
}
</style>

login.vue:

<template>
  <div style="display: flex;align-items: center;justify-content: center;background-color: aquamarine;height: 100vh;">
    <div style="display: flex;width: 50%;background-color: white;border-radius: 5px;overflow: hidden;">
      <div style="flex: 1;">
        <img src="@/assets/login.png" alt="" style="width: 100%;">
      </div>
      <div style="flex: 1;display: flex;align-items: center;justify-content: center;">
        <el-form :model="user" style="width: 80%;" :rules="rules" ref="loginRef">
          <div style="font-weight: bold; font-size: 20px;margin-bottom: 20px;text-align: center;">
            欢迎登陆后台管理系统
          </div>
          <el-form-item prop="username">
            <el-input placeholder="请输入用户名" v-model="user.username" prefix-icon="el-icon-user"></el-input>
          </el-form-item>
          <el-form-item prop="password">
            <el-input placeholder="请输入密码" v-model="user.password" show-password prefix-icon="el-icon-lock"></el-input>
          </el-form-item>
          <el-form-item prop="code">
            <div style="display: flex;">
              <el-input prefix-icon="el-icon-circle-check" v-model="user.code"></el-input>
              <div style="flex: 1;height: 32px"><valid-code @update:value="getCode"></valid-code></div>
            </div>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" style="width: 100%;" @click="login">登录</el-button>
          </el-form-item>
          <div style="display: flex;">
            <div style="flex: 1;">还没有账号?去<span style="color:aquamarine;cursor: pointer;" @click="$router.push('/register')">注册</span></div>
            <div style="flex: 1;text-align: right;cursor: pointer;color: aquamarine;" @click="handleForgetPass">忘记密码</div>
          </div>
        </el-form>
      </div>
    </div>
    <el-dialog title="忘记密码" :visible.sync="forgetPassDialogVis" width="30%">
      <el-form :model="forgetUserForm" label-width="80px" style="padding-right: 20px">
        <el-form-item label="用户名">
          <el-input v-model="forgetUserForm.username" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item label="手机号">
          <el-input v-model="forgetUserForm.phone" autocomplete="off"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="forgetPassDialogVis = false">取 消</el-button>
        <el-button type="primary" @click="resetPassword">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import ValidCode from "@/components/ValidCode.vue";
export default {
  name:'login',
  components:{
    ValidCode
  },
  data() {

    const validateCode = (rule, value, callback) => {
      if (value === '') {
        callback(new Error('请输入验证码'));
      } else if(value.toLowerCase() !== this.code){
        callback(new Error('验证码错误'));
      } else {
        callback();
      }
    };
    return {
      forgetUserForm:{

      },
      forgetPassDialogVis:false,
      code:'',
      user: {
        code:'',
        username: '',
        password: ''
      },
      rules:{
        username:[{
          required:'true',message:'请输入账号',trigger:'blur'
        }],
        password:[{
          required:'true',message:'请输入密码',trigger:'blur'
        }],
        code:[{
          validator:validateCode,trigger:'blur'
        }]
      },
    }
  },
  methods:{
    handleForgetPass(){
      this.forgetUserForm={}
      this.forgetPassDialogVis=true
    },
    getCode(code){
      this.code=code.toLowerCase()
    },
    resetPassword(){
      this.$request.put('/password',this.forgetUserForm).then(res=>{
        if(res.code==='200'){
          this.$message.success('密码重置成功')
          this.forgetPassDialogVis=false
        }else{
          this.$message.error(res.msg)
        }
      })
    },
    login(){
      this.$refs['loginRef'].validate((valid=>{
        if(valid){
          this.$request.post("/login",this.user).then(res=>{
            if(res.code === '200'){
              this.$router.push('/')
              this.$message.success('登录成功')
              localStorage.setItem('honey-user',JSON.stringify(res.data))
            }else{
              this.$message.error(res.msg)
            }
            console.log(res);
          })
        }
      }))
    }
  }
}
</script>

<style scoped></style>

后端部分 

只需要为忘记密码编写一个新接口即可:

 WebController:

package com.example.springboot.controller;

import cn.hutool.core.util.StrUtil;
import com.example.springboot.common.AuthAccess;
import com.example.springboot.common.Result;
import com.example.springboot.entity.User;
import com.example.springboot.exception.ServiceException;
import com.example.springboot.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
public class WebController {
    @Resource
    UserService userService;

    @AuthAccess
    @GetMapping("/")
    public Result hello(){
        return Result.success("success");
    }

    @PostMapping("/login")
    public Result login(@RequestBody User user){
        if(StrUtil.isBlank(user.getUsername())||StrUtil.isBlank(user.getPassword())){
            return Result.error("数据输入错误");
        }
        user=userService.login(user);
        return Result.success(user);
    }

    @AuthAccess
    @PostMapping("/register")
    public Result register(@RequestBody User user){
        if(StrUtil.isBlank(user.getUsername())||StrUtil.isBlank(user.getPassword())){
            throw new ServiceException("输入不合法");
        }
        if(user.getUsername().length()>10||user.getPassword().length()>20){
            throw new ServiceException("长度过长");
        }
        user=userService.register(user);
        return Result.success(user);
    }
    @AuthAccess
    @PutMapping("/password")
    public Result password(@RequestBody User user){
        if(StrUtil.isBlank(user.getUsername())||StrUtil.isBlank(user.getPhone())){
            throw new ServiceException("输入不合法");
        }
        userService.resetPassword(user);
        return Result.success();
    }
}

 UserService:

package com.example.springboot.service;

import com.example.springboot.entity.User;
import com.example.springboot.exception.ServiceException;
import com.example.springboot.mapper.UserMapper;
import com.example.springboot.utils.TokenUtils;
import jdk.nashorn.internal.parser.Token;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;
    public void insertUser(User user){
        userMapper.insert(user);
    }

    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    public void deleteUser(Integer id) {
        userMapper.deleteUser(id);
    }

    public void batchdeleteUser(List<Integer> ids) {
        for(Integer id : ids){
            userMapper.deleteUser(id);
        }
    }


    public List<User> selectall() {
        return userMapper.selectall();
    }

    public User selectbyid(Integer id) {
        return userMapper.selectbyid(id);
    }

    public List<User> selectbyname(String name) {
        return userMapper.selectbyname(name);
    }

    public List<User> selectbymore(String username, String name) {
        return userMapper.selectbymore(username,name);
    }

    public List<User> selectbymo(String username, String name) {
        return userMapper.selectbymo(username,name);
    }

    public User login(User user) {
        User dbuser=userMapper.selectbyUsername(user.getUsername());
        if(dbuser == null){
            throw new ServiceException("账号不存在");
        }
        if(!user.getPassword().equals(dbuser.getPassword())){
            throw new ServiceException("账号或者密码错误");
        }
        String token=TokenUtils.createToken(dbuser.getId().toString(),dbuser.getPassword());
        dbuser.setToken(token);
        return dbuser;
    }

    public User register(User user) {
        User dbuser=userMapper.selectbyUsername(user.getUsername());
        if(dbuser != null){
            throw new ServiceException("用户名已存在");
        }
        userMapper.insert(user);
        return user;
    }

    public void resetPassword(User user) {
        User dbuser=userMapper.selectbyUsername(user.getUsername());
        if(dbuser==null){
            throw new ServiceException("用户不存在");
        }
        if(!user.getPhone().equals(dbuser.getPhone())){
            throw new ServiceException("验证错误");
        }
        dbuser.setPassword("123");
        userMapper.updateUser(dbuser);
    }
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/554919.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【运输层】TCP 的流量控制和拥塞控制

目录 1、流量控制 2、TCP 的拥塞控制 &#xff08;1&#xff09;拥塞控制的原理 &#xff08;2&#xff09;拥塞控制的具体方法 1、流量控制 一般说来&#xff0c;我们总是希望数据传输得更快一些。但如果发送方把数据发送得过快&#xff0c;接收方就可能来不及接收&#x…

Ubuntu20.04无法连接蓝牙

连接蓝牙的时候一直转圈显示搜索中&#xff0c;但是搜索不出来任何设备。 在终端输入 dmesg | grep -i blue 可看到有以下信息 可以看到无法识别蓝牙&#xff0c;处于一个unknow的状态 Bluetooth: hci0: RTL: unknown IC info, lmp subver 8852, hci rev 000b, hci ver 000b…

云轴科技ZStack入选中国信通院《高质量数字化转型产品及服务全景图(2023年度)》

近日&#xff0c;由中国互联网协会主办、中国信通院承办的“2024高质量数字化转型创新发展大会”暨“铸基计划”年度会议在北京成功召开。 本次大会发布了2024年度行业数字化转型趋势&#xff0c;总结并展望了“铸基计划”2023年取得的工作成果及2024年的工作规划。同时&#…

支付宝支付之SpringBoot整合支付宝创建自定义支付二维码

文章目录 自定义支付二维码pom.xmlapplication.yml自定义二维码类AlipayService.javaAlipayServiceImpl.javaAlipayController.javaqrCode.html 自定义支付二维码 继&#xff1a;SpringBoot支付入门 pom.xml <dependency><groupId>org.springframework.boot<…

大语言模型微调技术

Adapter 参考资料&#xff1a;《Parameter-efficient transfer learning for nlp》 adpater首先将原始的d维特征映射到较小的维度m&#xff0c;应用非线性函数&#xff0c;然后再重新映射回d维。总的参数量&#xff08;包含biases&#xff09;为 2mddm&#xff0c; 当m远小于d…

算法打卡day38

今日任务&#xff1a; 1&#xff09;完全背包理论基础(卡码网52. 携带研究材料) 2&#xff09;518.零钱兑换II 3&#xff09;377. 组合总和 Ⅳ 4&#xff09;复习day13 完全背包理论基础(卡码网52. 携带研究材料) 题目链接&#xff1a;52. 携带研究材料&#xff08;第七期模拟…

以大学生活为主题的演讲稿(3篇)

以大学生活为主题的演讲稿&#xff08;3篇&#xff09; 以下是三篇以大学生活为主题的演讲稿范文&#xff0c;供您参考&#xff1a; 演讲稿一&#xff1a;拥抱大学生活&#xff0c;绽放青春梦想 尊敬的老师、亲爱的同学们&#xff1a; 大家好&#xff01; 今天&#xff0c;我…

VLAN知识点总结

首先对交换机等设备进行了解 中继器&#xff1a;物理层设备 只能提供电流信息的电压恢复&#xff0c;但无法恢复波形&#xff0c;所以无法理论无限延长传输距离 集线器&#xff1a;物理层设备 多接口的中继器 二层交换机的作用&#xff1a; 区别集线器&#xff08;HUB&#…

【问题处理】银河麒麟操作系统实例分享,服务器操作系统VNC远程问题分析

1.服务器环境以及配置 【内核版本】 4.19.90-23.8.v2101.ky10.aarch64 【OS镜像版本】 0518-server 2.问题现象描述 服务器通过vncserver:1.service服务启动的vnc服务后&#xff0c;普通用户用vnc连接时&#xff0c;锁屏后&#xff0c;然后输入登陆密码会报密码错误&…

五款3dmax常用插件推荐(含云渲染工具)

在三维建模和动画设计领域&#xff0c;3ds Max软件因其强大功能和灵活性而广受欢迎。为了进一步提升工作效率和创作质量&#xff0c;有许多插件可供选择。本文推荐五款常用3ds Max插件&#xff0c;帮助你更好实现复杂的模型和动效创作。 五款3dmax常用插件推荐 1、Kitchen Cab…

RocketMQ并发消息消费重试DEMO

无序消息的重试只针对集群消费模式生效&#xff1b;广播消费模式不提供失败重试特性 Producer 发了100个对象消息 public class AddProducer {public static void main(String[] args) throws Exception {DefaultMQProducer producer new DefaultMQProducer("a-group&q…

计算机视觉入门:探索机器如何“看见”世界

计算机视觉是人工智能领域的一个令人兴奋的分支&#xff0c;它使计算机能够从图像和视频中“看见”和理解世界。这项技术已经渗透到我们生活的方方面面&#xff0c;从智能手机的面部识别到自动驾驶汽车的导航系统。但是&#xff0c;计算机视觉是如何工作的呢&#xff1f;让我们…

U盘管理软件 设置U盘权限的软件

U盘管理软件 设置U盘权限的软件 我们都知道U盘的功能很强大&#xff0c;携带也很方便&#xff0c;但是它的危险指数也是相当高的&#xff0c;既容易携带病毒&#xff0c;又可以拷贝公司里的保密文件。所以很多企业都很关注对U盘使用的管理&#xff0c;而方法&#xff0c;最好的…

PLSQL的下载与安装

个人介绍 hello hello~ &#xff0c;这里是 code袁~&#x1f496;&#x1f496; &#xff0c;欢迎大家点赞&#x1f973;&#x1f973;关注&#x1f4a5;&#x1f4a5;收藏&#x1f339;&#x1f339;&#x1f339; &#x1f981;作者简介&#xff1a;一名喜欢分享和记录学习的…

色彩的魔力:渐变色在设计中的无限可能性

夕阳&#xff0c;天空&#xff0c;湖面&#xff0c;夕阳...随着距离和光影的变化&#xff0c;颜色的渐变色&#xff0c;近大远小、近实远虚的透视&#xff0c;为大自然营造了浪漫的氛围。延伸到UI/UX设计领域&#xff0c;这种现实、惊艳、独特的渐变色也深受众多设计师的喜爱。…

JavaEE初阶Day 13:多线程(11)

目录 Day 13&#xff1a;多线程&#xff08;11&#xff09;常见的锁策略1. 悲观锁 vs 乐观锁2. 重量级锁 vs 轻量级锁3. 自旋锁 vs 挂起等待锁4. 可重入锁 vs 不可重入锁5. 公平锁 vs 非公平锁6. 互斥锁 vs 读写锁 synchronized实现原理1. 锁升级2. 锁消除3. 锁粗化 CAS Day 13…

“捡到一束光,日落时还给太阳”

数据结构初阶题解 1.移除元素2.合并两个有序数组3.移除链表元素4.反转链表5.合并两个有序链表6.链表的中间结点7.环形链表的约瑟夫问题8.分割链表有感&#xff1a;其实我早就死了&#xff0c;死在破碎的三观里&#xff1b;死在飘渺的理想里&#xff1b;死在幻想的感情里&#x…

[AHK]自定义消息实现两个脚本之间通信

自己编写的两个脚本&#xff0c;用自定义消息实现&#xff0c;一个脚本控制另一个脚本&#xff0c;让被控脚本挂起或退出。 从aaa.ahk向bbb.ahk发送一个消息&#xff0c;bbb.ahk捕获消息后再进行处理&#xff0c;比如&#xff1a; 从aaa.ahk中向bbb.ahk发送特定的数字&#xff…

gpt-6有望成为通用工具

OpenAI CEO山姆奥特曼&#xff08;Sam Altman&#xff09;在最新的博客访谈中&#xff0c;提到gpt-6有望成为通用工具。 奥特曼还认为&#xff0c;目前的模型不够聪明&#xff0c;“使用GPT-2进行科学研究曾被认为是不切实际的想法。而如今&#xff0c;虽然人们使用GPT-4进行科…

短视频评论ID批量爬虫提取获客软件|DY评论下载采集工具

短视频评论批量抓取软件&#xff1a;智能拓客&#xff0c;精准抓取用户反馈 在当今数字化营销时代&#xff0c;了解用户的需求和反馈对于企业的发展至关重要。而作为流行的短视频平台&#xff0c;短视频评论蕴含了丰富的用户信息和市场洞察。为了帮助企业高效获取这些宝贵数据…