jquery网站开发教程漳州最便宜的网站建设价格

news/2025/9/27 12:25:07/文章来源:
jquery网站开发教程,漳州最便宜的网站建设价格,国外免费建站网站,怎样制作免费个人网页作者 | BoCong-Deng来源 | CSDN 博客#xff0c;责编 | 夕颜头图 | CSDN 下载自东方 IC出品 | CSDN#xff08;ID:CSDNnews#xff09;写在前面开发Web应用#xff0c;对页面的安全控制通常是必须的。比如#xff1a;对于没有访问权限的用户需要转到登录表单页面。要实现访… 作者 | BoCong-Deng来源 | CSDN 博客责编 | 夕颜头图 | CSDN 下载自东方 IC出品 | CSDNID:CSDNnews写在前面开发Web应用对页面的安全控制通常是必须的。比如对于没有访问权限的用户需要转到登录表单页面。要实现访问控制的方法多种多样可以通过Aop、拦截器实现也可以通过框架实现例如Apache Shiro、Spring Security。我们这里要讲的Spring Security 就是一个Spring生态中关于安全方面的框架。它能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案。默认认证用户名密码项目pom.xml添加spring-boot-starter-security依赖1dependency 2    groupIdorg.springframework.boot/groupId 3    artifactIdspring-boot-starter-security/artifactId 4/dependency 重启你的应用。再次打开页面你讲看到一个登录页面既然跳到了登录页面那么这个时候我们就会想这个登录的用户名以及密码是什么呢让我们来从SpringBoot源码寻找一下。你搜一下输出日志会看到下面一段输出这段日志是UserDetailsServiceAutoConfiguration类里面的如下方法输出的通过上面的这个类我们可以看出是SecurityProperties这个Bean管理了用户名和密码。在SecurityProperties里面的一个内部静态类User类里面管理了默认的认证的用户名与密码。代码如下 1ConfigurationProperties(2    prefix  spring.security3)4public class SecurityProperties {5    public static final int BASIC_AUTH_ORDER  2147483642;6    public static final int IGNORED_ORDER  -2147483648;7    public static final int DEFAULT_FILTER_ORDER  -100;8    private final SecurityProperties.Filter filter  new SecurityProperties.Filter();9    private SecurityProperties.User user  new SecurityProperties.User(); 10 11    public SecurityProperties() { 12    } 13 14    public SecurityProperties.User getUser() { 15        return this.user; 16    } 17 18    public SecurityProperties.Filter getFilter() { 19        return this.filter; 20    } 21 22    public static class User { 23        private String name  user; 24        private String password  UUID.randomUUID().toString(); 25        private ListString roles  new ArrayList(); 26        private boolean passwordGenerated  true; 27 28        public User() { 29        } 30 31        public String getName() { 32            return this.name; 33        } 34 35        public void setName(String name) { 36            this.name  name; 37        } 38 39        public String getPassword() { 40            return this.password; 41        } 42 43        public void setPassword(String password) { 44            if (StringUtils.hasLength(password)) { 45                this.passwordGenerated  false; 46                this.password  password; 47            } 48        } 49 50        public ListString getRoles() { 51            return this.roles; 52        } 53 54        public void setRoles(ListString roles) { 55            this.roles  new ArrayList(roles); 56        } 57 58        public boolean isPasswordGenerated() { 59            return this.passwordGenerated; 60        } 61    } 62 63    public static class Filter { 64        private int order  -100; 65        private SetDispatcherType dispatcherTypes; 66 67        public Filter() { 68            this.dispatcherTypes  new HashSet(Arrays.asList(DispatcherType.ASYNC, DispatcherType.ERROR, DispatcherType.REQUEST)); 69        } 70 71        public int getOrder() { 72            return this.order; 73        } 74 75        public void setOrder(int order) { 76            this.order  order; 77        } 78 79        public SetDispatcherType getDispatcherTypes() { 80            return this.dispatcherTypes; 81        } 82 83        public void setDispatcherTypes(SetDispatcherType dispatcherTypes) { 84            this.dispatcherTypes  dispatcherTypes; 85        } 86    } 87} 综上所述security默认的用户名是user, 默认密码是应用启动的时候通过UUID算法随机生成的默认的role是USER。当然如果我们想简单改一下这个用户名密码可以在application.properties配置你的用户名密码例如当然这只是一个初级的配置更复杂的配置可以分不用角色在控制范围上能够拦截到方法级别的权限控制。内存用户名密码认证在上面的内容我们什么都没做就添加了spring-boot-starter-security依赖整个应用就有了默认的认证安全机制。下面我们来定制用户名密码。写一个继承了 WebSecurityConfigurerAdapter的配置类具体内容如下 1import org.springframework.context.annotation.Configuration;2import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;3import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;4import org.springframework.security.config.annotation.web.builders.HttpSecurity;5import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;6import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;78Configuration9EnableWebSecurity 10EnableGlobalMethodSecurity(prePostEnabled  true, securedEnabled  true, jsr250Enabled  true) 11public class WebSecurityConfig extends WebSecurityConfigurerAdapter { 12    Override 13    protected void configure(HttpSecurity http) throws Exception { 14        super.configure(http); 15    } 16 17    Override 18    protected void configure(AuthenticationManagerBuilder auth) throws Exception { 19        auth.inMemoryAuthentication() 20                .passwordEncoder(new BCryptPasswordEncoder()) 21                .withUser(admin) 22                .password(new BCryptPasswordEncoder().encode(1234567)) 23                .roles(USER); 24    } 25} 这里对上面的代码进行简要说明Spring security 5.0中新增了多种加密方式也改变了默认的密码格式。需要修改一下configure中的代码我们要将前端传过来的密码进行某种方式加密Spring Security 官方推荐的是使用bcrypt加密方式。inMemoryAuthentication().passwordEncoder(new BCryptPasswordEncoder())这相当于登陆时用BCrypt加密方式对用户密码进行处理。以前的.password(123) 变成了 “.password(new BCryptPasswordEncoder().encode(123))”这相当于对内存中的密码进行Bcrypt编码加密。如果比对时一致说明密码正确才允许登陆。通过 EnableWebSecurity注解开启Spring Security的功能。使用EnableGlobalMethodSecurity(prePostEnabled true)这个注解可以开启security的注解我们可以在需要控制权限的方法上面使用PreAuthorizePreFilter这些注解。继承 WebSecurityConfigurerAdapter 类并重写它的方法来设置一些web安全的细节。我们结合EnableWebSecurity注解和继承WebSecurityConfigurerAdapter来给我们的系统加上基于web的安全机制。在configure(HttpSecurity http)方法里面我们进入到源码中就会看到默认的认证代码是从方法名我们基本可以看懂这些方法的功能。上面的那个默认的登录页面就是SpringBoot默认的用户名密码认证的login页面。我们使用SpringBoot默认的配置super.configure(http)它通过 authorizeRequests() 定义哪些URL需要被保护、哪些不需要被保护。默认配置是所有访问页面都需要认证才可以访问。通过 formLogin() 定义当需要用户登录时候转到的登录页面。configureGlobal(AuthenticationManagerBuilder auth) 方法在内存中创建了一个用户该用户的名称为root密码为root用户角色为USER。这个默认的登录页面是怎么冒出来的呢是的SpringBoot内置的SpringBoot甚至给我们做好了一个极简的登录页面。这个登录页面是通过Filter实现的。具体的实现类是org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter。同时这个DefaultLoginPageGeneratingFilter也是SpringBoot的默认内置的Filter。输入用户名密码点击Login。不过我们发现SpringBoot应用的启动日志还是打印了如下一段但实际上已经使用了我们定制的用户名密码了。如果我们要配置多个用户多个角色可参考使用如下示例的代码 1Override2    protected void configure(AuthenticationManagerBuilder auth) throws Exception {3        auth.inMemoryAuthentication()4                .passwordEncoder(new BCryptPasswordEncoder())5                .withUser(admin)6                .password(new BCryptPasswordEncoder().encode(1234567))7                .roles(USER)8                .and()9                .withUser(admin1) 10                .password(new BCryptPasswordEncoder().encode(123)) 11                .roles(ADMIN, USER); 12    } 角色权限控制当我们的系统功能模块当需求发展到一定程度时会不同的用户不同角色使用我们的系统。这样就要求我们的系统可以做到能够对不同的系统功能模块开放给对应的拥有其访问权限的用户使用。Spring Security提供了Spring EL表达式允许我们在定义URL路径访问(RequestMapping)的方法上面添加注解来控制访问权限。在标注访问权限时根据对应的表达式返回结果控制访问权限1true表示有权限 2fasle表示无权限 Spring Security可用表达式对象的基类是SecurityExpressionRoot。 1public abstract class SecurityExpressionRoot implements SecurityExpressionOperations {2    protected final Authentication authentication;3    private AuthenticationTrustResolver trustResolver;4    private RoleHierarchy roleHierarchy;5    private SetString roles;6    private String defaultRolePrefix  ROLE_;7    public final boolean permitAll  true;8    public final boolean denyAll  false;9    private PermissionEvaluator permissionEvaluator;10    public final String read  read;11    public final String write  write;12    public final String create  create;13    public final String delete  delete;14    public final String admin  administration;1516    public SecurityExpressionRoot(Authentication authentication) {17        if (authentication  null) {18            throw new IllegalArgumentException(Authentication object cannot be null);19        } else {20            this.authentication  authentication;21        }22    }2324    public final boolean hasAuthority(String authority) {25        return this.hasAnyAuthority(authority);26    }2728    public final boolean hasAnyAuthority(String... authorities) {29        return this.hasAnyAuthorityName((String)null, authorities);30    }3132    public final boolean hasRole(String role) {33        return this.hasAnyRole(role);34    }3536    public final boolean hasAnyRole(String... roles) {37        return this.hasAnyAuthorityName(this.defaultRolePrefix, roles);38    }3940    private boolean hasAnyAuthorityName(String prefix, String... roles) {41        SetString roleSet  this.getAuthoritySet();42        String[] var4  roles;43        int var5  roles.length;4445        for(int var6  0; var6  var5; var6) {46            String role  var4[var6];47            String defaultedRole  getRoleWithDefaultPrefix(prefix, role);48            if (roleSet.contains(defaultedRole)) {49                return true;50            }51        }5253        return false;54    }5556    public final Authentication getAuthentication() {57        return this.authentication;58    }5960    public final boolean permitAll() {61        return true;62    }6364    public final boolean denyAll() {65        return false;66    }6768    public final boolean isAnonymous() {69        return this.trustResolver.isAnonymous(this.authentication);70    }7172    public final boolean isAuthenticated() {73        return !this.isAnonymous();74    }7576    public final boolean isRememberMe() {77        return this.trustResolver.isRememberMe(this.authentication);78    }7980    public final boolean isFullyAuthenticated() {81        return !this.trustResolver.isAnonymous(this.authentication)  !this.trustResolver.isRememberMe(this.authentication);82    }8384    public Object getPrincipal() {85        return this.authentication.getPrincipal();86    }8788    public void setTrustResolver(AuthenticationTrustResolver trustResolver) {89        this.trustResolver  trustResolver;90    }9192    public void setRoleHierarchy(RoleHierarchy roleHierarchy) {93        this.roleHierarchy  roleHierarchy;94    }9596    public void setDefaultRolePrefix(String defaultRolePrefix) {97        this.defaultRolePrefix  defaultRolePrefix;98    }99 100    private SetString getAuthoritySet() { 101        if (this.roles  null) { 102            Collection? extends GrantedAuthority userAuthorities  this.authentication.getAuthorities(); 103            if (this.roleHierarchy ! null) { 104                userAuthorities  this.roleHierarchy.getReachableGrantedAuthorities(userAuthorities); 105            } 106 107            this.roles  AuthorityUtils.authorityListToSet(userAuthorities); 108        } 109 110        return this.roles; 111    } 112 113    public boolean hasPermission(Object target, Object permission) { 114        return this.permissionEvaluator.hasPermission(this.authentication, target, permission); 115    } 116 117    public boolean hasPermission(Object targetId, String targetType, Object permission) { 118        return this.permissionEvaluator.hasPermission(this.authentication, (Serializable)targetId, targetType, permission); 119    } 120 121    public void setPermissionEvaluator(PermissionEvaluator permissionEvaluator) { 122        this.permissionEvaluator  permissionEvaluator; 123    } 124 125    private static String getRoleWithDefaultPrefix(String defaultRolePrefix, String role) { 126        if (role  null) { 127            return role; 128        } else if (defaultRolePrefix ! null  defaultRolePrefix.length() ! 0) { 129            return role.startsWith(defaultRolePrefix) ? role : defaultRolePrefix  role; 130        } else { 131            return role; 132        } 133    } 134} 通过阅读源码我们可以更加深刻的理解其EL写法并在写代码的时候正确的使用。变量defaultRolePrefix硬编码约定了role的前缀是ROLE_。同时我们可以看出hasRole跟hasAnyRole是一样的。hasAnyRole是调用的hasAnyAuthorityName(defaultRolePrefix, roles)。所以我们在学习一个框架或者一门技术的时候最准确的就是源码。通过源码我们可以更好更深入的理解技术的本质。SecurityExpressionRoot为我们提供的使用Spring EL表达式总结如下在Controller方法上添加PreAuthorize这个注解valuehasRole(ADMIN))是Spring-EL expression当表达式值为true标识这个方法可以被调用。如果表达式值是false标识此方法无权限访问。在Spring Security里获取当前登录认证通过的用户信息如果我们想要在前端页面显示当前登录的用户怎么办呢在在Spring Security里面怎样获取当前登录认证通过的用户信息下面我们就来探讨这个问题。其实很好办。我们添加一个LoginFilter默认拦截所有请求把当前登录的用户放到系统session中即可。在Spring Security中用户信息保存在SecurityContextHolder中。Spring Security使用一个Authentication对象来持有所有系统的安全认证相关的信息。这个信息的内容格式如下 1{2    accountNonExpired:true,3    accountNonLocked:true,4    authorities:[{5        authority:ROLE_ADMIN6    },{7        authority:ROLE_USER8    }],9    credentialsNonExpired:true, 10    enabled:true, 11    username:root 12} 这个Authentication对象信息其实就是User实体的信息类似如下(当然密码没放进来)。 1public class User implements UserDetails, CredentialsContainer {2    private String password;3    private final String username;4    private final SetGrantedAuthority authorities;5    private final boolean accountNonExpired;6    private final boolean accountNonLocked;7    private final boolean credentialsNonExpired;8    private final boolean enabled;9        .... 10} 我们可以使用下面的代码Java获得当前身份验证的用户的名称:1Object principal  SecurityContextHolder.getContext().getAuthentication().getPrincipal(); 2 3if (principal instanceof UserDetails) { 4    String username  ((UserDetails)principal).getUsername(); 5} else { 6    String username  principal.toString(); 7} 通过调用getContext()返回的对象是SecurityContext的实例对象该实例对象保存在ThreadLocal线程本地存储中。使用Spring Security框架通常的认证机制都是返回UserDetails实例通过如上这种方式我们就可以拿到认证登录的用户信息。用数据库存储用户和角色实现安全认证很多时候我们需要的是实现一个用数据库存储用户和角色实现系统的安全认证。为了简化讲解本例中在权限角色上我们简单设计两个用户角色USERADMIN。我们设计页面的权限如下首页/ : 所有人可访问登录页 /login: 所有人可访问普通用户权限页 /httpapi, /httpsuite: 登录后的用户都可访问管理员权限页 /httpreport 仅管理员可访问无权限提醒页当一个用户访问了其没有权限的页面我们使用全局统一的异常处理页面提示。配置Spring Security我们首先使用Spring Security帮我们做登录、登出的处理以及当用户未登录时只能访问: http://localhost:8080/ 以及 http://localhost:8080/login 两个页面。同样的我们要写一个继承WebSecurityConfigurerAdapter的配置类 1import com.springboot.in.action.service.LightSwordUserDetailService;2import org.springframework.context.annotation.Bean;3import org.springframework.context.annotation.Configuration;4import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;5import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;6import org.springframework.security.config.annotation.web.builders.HttpSecurity;7import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;8import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;9import org.springframework.security.core.userdetails.UserDetailsService; 10 11/** 12 * Created by jack on 2017/4/27. 13 */ 14 15Configuration 16EnableWebSecurity 17EnableGlobalMethodSecurity(prePostEnabled  true, securedEnabled  true, jsr250Enabled  true) 18//使用EnableGlobalMethodSecurity(prePostEnabled  true) 19// 这个注解可以开启security的注解我们可以在需要控制权限的方法上面使用PreAuthorizePreFilter这些注解。 20public class WebSecurityConfig extends WebSecurityConfigurerAdapter { 21    Override 22    Bean 23    public UserDetailsService userDetailsService() { //覆盖写userDetailsService方法 (1) 24        return new AdminUserDetailService(); 25 26    } 27 28    /** 29     * If subclassed this will potentially override subclass configure(HttpSecurity) 30     * 31     * param http 32     * throws Exception 33     */ 34    Override 35    protected void configure(HttpSecurity http) throws Exception { 36        //super.configure(http); 37        http.csrf().disable(); 38 39        http.authorizeRequests() 40            .antMatchers(/).permitAll() 41            .antMatchers(/amchart/**, 42                /bootstrap/**, 43                /build/**, 44                /css/**, 45                /dist/**, 46                /documentation/**, 47                /fonts/**, 48                /js/**, 49                /pages/**, 50                /plugins/** 51            ).permitAll() //默认不拦截静态资源的url pattern 2 52            .anyRequest().authenticated().and() 53            .formLogin().loginPage(/login)// 登录url请求路径 (3) 54            .defaultSuccessUrl(/httpapi).permitAll().and() // 登录成功跳转路径url(4) 55            .logout().permitAll(); 56 57        http.logout().logoutSuccessUrl(/); // 退出默认跳转页面 (5) 58 59    } 60 61    Override 62    protected void configure(AuthenticationManagerBuilder auth) throws Exception { 63        //AuthenticationManager使用我们的 Service来获取用户信息Service可以自己写其实就是简单的读取数据库的操作 64        auth.userDetailsService(()); // 6 65    } 66 67} 上面的代码只做了基本的配置其中覆盖写userDetailsService方法具体的AdminUserDetailsService实现类就是之前说的获取用户信息的service层类。默认不拦截静态资源的url pattern。我们也可以用下面的WebSecurity这个方式跳过静态资源的认证。1public void configure(WebSecurity web) throws Exception { 2    web 3        .ignoring() 4        .antMatchers(/resourcesDir/**); 5} 跳转登录页面url请求路径为/login我们需要定义一个Controller把路径映射到login.html。登录成功后跳转的路径为/httpapi退出后跳转到的url为/认证鉴权信息的Bean采用我们自定义的从数据库中获取用户信息的AdminUserDetailService类。我们同样使用EnableGlobalMethodSecurity(prePostEnabled true)这个注解开启security的注解这样我们可以在需要控制权限的方法上面使用PreAuthorizePreFilter这些注解。用户退出我们在configure(HttpSecurity http)方法里面定义了任何权限都允许退出当然SpringBoot集成Security的默认退出请求是/logout1http.logout().logoutSuccessUrl(/); // 退出默认跳转页面 (4) 配置错误处理页面访问发生错误时跳转到系统统一异常处理页面。我们首先添加一个GlobalExceptionHandlerAdvice使用ControllerAdvice注解 1import org.springframework.web.bind.annotation.{ControllerAdvice, ExceptionHandler}2import org.springframework.web.context.request.WebRequest3import org.springframework.web.servlet.ModelAndView45/**6  * Created by jack on 2017/4/27.7  */8ControllerAdvice9class GlobalExceptionHandlerAdvice { 10  ExceptionHandler(value  Exception.class)//表示捕捉到所有的异常你也可以捕捉一个你自定义的异常 11    public ModelAndView exception(Exception exception, WebRequest request){ 12        ModelAndView modelAndView  new ModelAndView(/error); 13        modelAndView.addObject(errorMessage, exception.getMessage()); 14        modelAndView.addObject(stackTrace, exception.getStackTrace()); 15        return modelAndView; 16    } 17} 其中ExceptionHandler(value Exception.class)表示捕捉到所有的异常这里你也可以捕捉一个你自定义的异常。比如说针对安全认证的Exception我们可以单独定义处理。此处不再赘述。原文链接https://blog.csdn.net/DBC_121/article/details/104740273为了让大家更好地了解开发者CSDN特发起“开发者与AI大调查”活动。 点击阅读原文填写调查问卷您将获得价值299元的「2020 AI 开发者万人大会」在线直播门票一张哟推荐阅读为何你的 SaaS 想法总是失败没想清楚这 4 个原因可能会继续失败 如何给女朋友解释什么是撞库、脱库和洗库 开源的未来 10 年中国开源社区建立是关键 万字好文智能合约编写之Solidity的编程攻略建议收藏 Python 爬取疫情期间全球股市走向笑不出来...... 无代码时代来临程序员如何保住饭碗 真香朕在看了

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

怎样加入装修接单网站网上做设计的网站

Android早已超过Windows,坐拥全球用户量最大的操作系统宝座。这么高的人气,当然会有很多可玩性,比如Android -x86项目,即在x86处理器平台上运行Android。据悉,底层升级为Android 9 Pie(android-9.0.0_r50)的x86项目已经…

深度互联:金兰契协议下的领域知识与元智慧共生

深度互联:金兰契协议下的领域知识与元智慧共生 在信息爆炸的时代,知识正以前所未有的速度分化与沉淀,形成一座座精深的“领域孤岛”。我们精通了如何在各自的岛屿上深耕,却常常忘记了如何与隔海相望的邻居对话。岐…

如何用api方式做网站建设博客网站制作

mac如何投屏手机1.首先,解iPhone,然后用手指从下往上,打开控心,在其中就可以找到AirPlay了屏幕镜像。2.接来下就来教大家如何使用AirPlay吧,首先将手机和电脑连接在同一WiFi网络之下,这是投屏成功的前提条件…

以营销为导向的网站建设小程序登录注册

RestFul风格或者是web阶段接触过的异步请求,都需要把数据转换成Json放入响应体中。 ResponseBody的作用其实是将java对象转为json格式的相应内容 使用 RequestMapping注解时,Spring会将返回值解析为视图路径,然后跳转路径返回对应的视图页面…

做网站多少钱西宁君博专注番禺网站建设制作

已经找到工作,但希望再试试春招,距离春招还剩两个月,加油。 这两道题都刷过很多遍了,没什么好说的直接过。 704 本以为刷了很多次没想到还是做错了,有些小细节要注意。 这里是迭代式的,函数式的也不难。 …

阿里巴巴网站建设代理查询类网站用什么做

经常要使用VMWare Workstation来在本地测试不同的操作系统&#xff0c;以前也搞不清楚网络连接三种模式&#xff0c;最近看了几篇文章才算明白。现总结如下&#xff1a; 1. VMware Workstation的虚拟网络组件 虚拟<网卡/网络适配器>&#xff1a;见下图。安装一个虚拟PC…

河口建设局网站深圳设计公司最新招聘

Python的pymysql模块与MySQL数据库的互动&#xff1a;基础与实例 一、连接数据库二、创建游标三、执行SQL命令四、关闭连接 在Python的世界里&#xff0c;操作MySQL数据库最常用的库就是pymysql。 pymysql是一个灵活且易于使用的库&#xff0c;它允许我们以Python的方式操作MyS…

Winform无边框窗体拖动功能实现

1. 设置无边框模式 选中要去除边框的窗体,按F4调出其属性面板,在属性面板中找到 FormBorderStyle ,并选择 ​None,即可将窗体设置成无边框模式;默认是无法随意拖动的,也没有最大化最小化关闭按钮。 2. 通过Pan…

淘宝联盟交钱建设网站手机网站qq代码

以下配置为我自己的需求&#xff0c;因人而异&#xff0c;如果只是单纯的前端非交互页面&#xff0c;可以不用修改配置。 代码及注释&#xff0c;如下&#xff1a; #解决vue-router设置mode为history&#xff0c;去掉路由地址上的/#/后nginx显示404的问题location / {proxy_htt…

厦门电脑网站建设张家界做网站的

随着社会经济的发展和数字技术的进步&#xff0c;互联网行业发展迅速。为了适应新时代社会发展的需要&#xff0c;大数据在这个社会经济发展过程中随着技术的进步而显得尤为重要。同时&#xff0c;大数据技术的快速发展进程也推动了可视化技术的飞速发展&#xff0c;国内外各类…

夺宝网站建设深圳网站导航

1、安装ntpdate&#xff0c;同步标准时间 2、修改时区 3、在.profile文件中写入上面提示的信息&#xff0c;保存退出、更新配置文件或者重启生效 3.1、或者配合上面的cp那条命令&#xff0c;用下面的命令保存到底层 $ hwclock --systohc 4、重启之后&#xff0c;查看日期时间已…

免费网站免费进入在线蓬莱网站建设价格

[react] 在react中页面重新加载时怎样保留数据&#xff1f; 使用浏览器localstorage来保存应用程序的状态 个人简介 我是歌谣&#xff0c;欢迎和大家一起交流前后端知识。放弃很容易&#xff0c; 但坚持一定很酷。欢迎大家一起讨论 主目录 与歌谣一起通关前端面试题

net做公司网站网站建设所需要软件

GItlab概述 GitLab概述&#xff1a; 是一个利用 Ruby on Rails 开发的开源应用程序&#xff0c;实现一个自托管的Git项目仓库&#xff0c;可通过Web界面进行访问公开的或者私人项目。 Ruby on Rails 是一个可以使你开发、部署、维护 web 应用程序变得简单的框架。 GitLab拥有与…

网站的注册上一步下一步怎么做西昌市做网站的公司

文章目录 0. 引言1. 回顾2. PrioritizeNodes3. 有哪些优选算法4. selectHost5. 总结6. 参考 0. 引言 欢迎关注本专栏&#xff0c;本专栏主要从 K8s 源码出发&#xff0c;深入理解 K8s 一些组件底层的代码逻辑&#xff0c;同时借助 debug Minikube 来进一步了解 K8s 底层的代码…

建立网站赚钱 优帮云网站开发主要做什么

pytest&#xff1a; 需要安装pytest和pytest-html(生成html测试报告&#xff09; pip install pytest 和 pip install pytest-html 命名规则 Pytest单元测试中的类名和方法名必须是以test开头,执行中只能找到test开头的类和方法&#xff0c;比unittest更加严谨 unittest&#x…

邢台手机网站建设报价苏州网站营销公司简介

文章目录 前言一、思维导图危机一危机二危机三危机四危机五危机六危机七危机八 前言 重塑三观&#xff0c;致敬温老。一个有良心的学者&#xff01;&#xff01;&#xff01; 一、思维导图 危机一 危机二 危机三 危机四 危机五 危机六 危机七 危机八 ☆

买源码的网站wordpress提示框插件

随着人工智能和图像处理技术的不断发展&#xff0c;人像处理已成为企业宣传、产品展示、线上教育等领域不可或缺的一环。然而&#xff0c;面对复杂多变的人像背景&#xff0c;如何实现精准、高效的分割&#xff0c;一直是困扰企业的技术难题。为此&#xff0c;美摄科技凭借其领…

信息化建设 公司网站揭阳企业网站建设开发

智慧工地管理系统源码&#xff0c;智慧工地云平台源码&#xff0c;PC端APP端源码 智慧工地管理平台实现对人员劳务实名制管理、施工进度、安全管理、设备管理、区域安防监控系统、智能AI识别系统、用电/水监控系统、噪音扬尘监测、现场物料管理系统等方面的实时监控和管理&…

大良陈村网站建设北京推广平台

开数组 读入数据 记录最小值和最大值 每次读入x; 让a[x]; 从最小值开始 向上扫 当扫到a[x]0时候为断号 扫到a[x]>1为重号&#xff1b; 该题的小技巧 未知长度的数据的读入方式 1.首先在头文件敲上 #include<sstream> #include<string> #include<…

给宝宝做衣服网站好网站服务器结构图

1、目的 确保大模型的行为与人类价值观、人类真实意图和社会伦理相一致 2、大模型有害行为 无法正确遵循指令生成虚假信息产生有害、有误导性、有偏见的表达 3、评估标准 有用性诚实性无害性 4、更细化的对齐标准 行为对齐&#xff1a;要求AI能够做出符合人类期望的行为…