老师,我这个是创建完为什么没有视频老师里面的那几个文件啊。我这个是自己找的2020破解版的
import requests from fake_useragent import UserAgent url = 'https://www.baidu.com/s?' args = { 'wd': '快代理' } resp = requests.get(url, params=args, headers={"User-Agent": UserAgent().random}) resp.encoding = 'utf-8' print(resp.text)
老师,请问出现这种报错要怎么解决,在网上查的方法是
但试过之后还是没用
老师id(3)和id(a)的结果为什么不一样呢?不是把3赋值给a了吗?那么a就是3,3就是a呀
字符集编码GBK,GB2312是什么意思????
老师,视频中安装完数据库有多个文件夹,但我安装后只有两个文件夹,是否是安装Oracle失败,还是电脑版本问题。
老师,请问下图中黄色高亮部分是转换格式的意思吗
老师 突然之间我的软件弹了这个框出来是什么意思
mybatisDemo.zip
老师,找不到错误,帮我看下
我照着敲的,访问时候弹出这个
package com.security.handle; import org.springframework.security.access.AccessDeniedException; import org.springframework.security.web.access.AccessDeniedHandler; import org.springframework.stereotype.Component; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; /** * @author liufupeng * @date 2021/5/11 */ @Component public class MyAccessDeniedHandler implements AccessDeniedHandler { @Override public void handle(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AccessDeniedException e) throws IOException, ServletException { httpServletResponse.setStatus(HttpServletResponse.SC_FORBIDDEN); httpServletResponse.setContentType("application/json:charset=utf-8"); PrintWriter writer = httpServletResponse.getWriter(); writer.println("{\"code\":\"403\",\"msg\":\"无权限\"}"); writer.flush(); writer.close(); } }
package com.security.config; import com.security.handle.MyAccessDeniedHandler; import com.security.handle.MyAuthenticationFailHandler; import com.security.handle.MyAuthenticationSuccessHandler; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.crypto.password.PasswordEncoder; /** * @author liufupeng * @date 2021/5/8 */ @Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private MyAccessDeniedHandler myAccessDeniedHandler; @Override protected void configure(HttpSecurity http) throws Exception { // 表单认证 http.formLogin() .loginProcessingUrl("/login") // 当发现/login时认为是登陆,需要执行UserDetailsServiceImpl // .successForwardUrl("/toMain") // 登陆成功 此处为post请求 // .failureForwardUrl("/fail") .usernameParameter("username") //自定义username字段 .passwordParameter("password") .successHandler(new MyAuthenticationSuccessHandler("/toMain")) .failureHandler(new MyAuthenticationFailHandler("/fail.html")) .loginPage("/login.html"); // url 拦截 http.authorizeRequests() .antMatchers("/login.html", "/fail.html").permitAll() // 登陆不需要被认证 // .antMatchers("/main1.html").hasAuthority("admin") .antMatchers("/main1.html").hasIpAddress("127.0.0.1") .anyRequest().authenticated(); http.csrf().disable(); http.exceptionHandling() .accessDeniedHandler(myAccessDeniedHandler); } @Bean public PasswordEncoder getPe() { return new BCryptPasswordEncoder(); } }
避坑:创建项目时 vue命令用不了
需要用管理员身份运行VSCode。
查看当前策略:get-ExecutionPolicy。修改策略:set-ExecutionPolicy RemoteSigned。显示RemoteSigned 即可正常使用vue命令
老师,字符串 是字符的序列,那他的内存结构 也是存储多个字符对象地址吗?
img不是行内块元素吗?设置大小为何还要转变为块级元素
这里也没有讲索引的使用吧,只创建了索引,然后呢?126索引的使用这一课只有在议论什么时候用索引和什么时候不用索引,我应该没看漏吧。我还不知道怎么使用索引,就over了?
虚拟软件系统安装的,下载软件资料在哪下载
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637