Here are some ideas to get you started:
- 🔭 I’m currently working on Java Android Vue JS
- 🌱 I’m currently learning C#
- 📫 How to reach me Group:17470566
- 😄 Pronouns: ...
- ⚡ Fun fact: ...
X-SpringBoot是一个轻量级的Java快速开发平台,能快速开发项目并交付【接私活利器】
可能是我Spring还没有学明白,不太理解为什么com/suke/czx/authentication/SecurityConfigurer.java 中的authenticationSuccessHandler() 等方法要手动 new 实例,而不是使用依赖注入的方式呢?谢谢!
在成功部署前后端并运行,进行登录输入正确的用户名密码后,后台提示报错,新手不知道怎么解决求教
以下是报错信息:并没有改动项目
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
at jdk.proxy2/jdk.proxy2.$Proxy126.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
at jdk.proxy3/jdk.proxy3.$Proxy129.insert(Unknown Source)
at com.baomidou.mybatisplus.extension.service.IService.save(IService.java:60)
at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)
at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)
at com.suke.czx.modules.sys.service.impl.SysLoginLogServiceImpl$$EnhancerBySpringCGLIB$$83085ec9.save(<generated>)
at com.suke.czx.common.event.LoginLogListener.saveSysLog(LoginLogListener.java:25)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:344)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:229)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
at com.suke.czx.common.utils.SpringContextUtils.publishEvent(SpringContextUtils.java:29)
at com.suke.czx.authentication.handler.CustomAuthenticationFailHandler.onAuthenticationFailure(CustomAuthenticationFailHandler.java:42)
at com.suke.czx.interceptor.ValidateCodeFilter.doFilterInternal(ValidateCodeFilter.java:53)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:103)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:89)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:112)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:82)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:55)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:346)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:221)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:354)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:267)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:117)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:178)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:153)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:481)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:130)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:926)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1791)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:199)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
... 82 common frames omitted
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field protected java.lang.reflect.InvocationHandler java.lang.reflect.Proxy.h accessible: module java.base does not "opens java.lang.reflect" to unnamed module @f5958c9
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:177)
at org.apache.ibatis.reflection.invoker.GetFieldInvoker.invoke(GetFieldInvoker.java:38)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:161)
at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:49)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:116)
at org.apache.ibatis.reflection.MetaObject.metaObjectForProperty(MetaObject.java:144)
at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:118)
at com.suke.zhjg.common.autofull.interceptor.SqlInterceptor.realTarget(SqlInterceptor.java:103)
at com.suke.zhjg.common.autofull.interceptor.SqlInterceptor.intercept(SqlInterceptor.java:54)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy193.prepare(Unknown Source)
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:90)
at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:49)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
at com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:106)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:59)
at jdk.proxy2/jdk.proxy2.$Proxy192.update(Unknown Source)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
... 86 common frames omitted
点击上传文件,选择图片文件的时候,会有空白提示框,
rotected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) {
String url = request.getRequestURI();
if (pathMatcher.match(Constant.TOKEN_ENTRY_POINT_URL,url)){
String captcha = request.getParameter("captcha");
String randomStr = request.getParameter("randomStr");
String username=request.getParameter("username");
}
}
大神 无法获取到值是怎么 回事,新手请多指教
你好请问还在维护吗
您好,我只是安装了mysql,然后编译运行此工程 输入localhost:8080 {"msg":"hello welcome to use x-springboot","code":0}
如果我要显示项目中的截图内容 我还需要什么操作? 多谢
发现两个问题:
1,每次点按钮,api调用两次
2,新建的表,通过自动生成的代码,接口访问报404,实际有那个接口
打包成jar丢在服务器(端口8090)用jar运行的,x-springboot-ui 拷贝到服务器
nginx 按照demo配置的(监听8089端口),x-springboot-ui中common.js baseURL 直接写的服务器的ip加端口
跑起来提示跨域
Access to XMLHttpRequest at 'http://服务器IP:8090/token/login' from origin 'http://服务器IP:8089' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
请教一下大佬应该怎么配置呢?谢谢
我搭建好了之后,后台启动没问题,但是进入http://localhost:8080/login.html这个地址报了这个错:{"msg":"Full authentication is required to access this resource","code":401}
也没有页面
前段页面例如.../sys/user.htmlL,在其中简单修改了一些描述后重启NGINX也不起作用。
在VUE中跳转页面的修改都不起作用,即使所有页面都添加了清除缓存标识也不起作用,如下:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
在INDEX.HTML中修改时起效的,但是只要在MODULES下的页面不管如何重启,请缓存都不起作用。
请问这种情况是什么原因造成的?
master分支下,启动项目。在登录时会造成后端无响应的问题,经检查是由于项目启动类上缺少了@EnableAsync,导致项目无法正常运行
验证码一直显示不出是怎么回事,http://localhost:8080/sys/code/20200413174612 直接访问时可以出验证码的
你好,感觉这似乎是一个Bug。
前端common.js 24行将token从localStorage取出。只要token存在则放入header中。
所以哪怕是登录接口,都将会带有token参数。
若长时间不登录,后端redis中此token将消失。
当前端调用登录接口后,AuthenticationTokenFilter的51行取不到userid.则将返回“无效token”
这时前端将刷新login页面,导致无法登录。
我的解决方案是在login.html的153行加入 localStorage.removeItem("token");
当登录错误时就删除旧token。
不知道我的提问是否正确,期待回复,谢谢。
配置路径都没问题
强转有问题...原因有待研究
if(object != null){
return (CustomUserDetailsUser) object;
}
return object;
此处类型转换异常是由于spring-boot-devtools造成的,
去掉一下依赖即可解决
org.springframework.boot
spring-boot-devtools
true
参考来源:https://blog.csdn.net/yuqiling0818/article/details/101064389
请问一下有详细的文档吗?
v3.0
项目部分重构,精简部分代码
springboot 版本升级到 2.1.8
移除shiro 安全框架
新增spring security 安全框架
生成Controller代码的模板没有同步更新,仍然引入了shiro相关,导致新生成的代码编译不过
把动画删掉就OK
首先非常感谢作者原创的此框架, 让我开发更加高效,在使用中发现了框架中的一部分小问题,在此想提出来和作者交流一下, 可能有些并非bug,而是框架设计本身就是这样的,具体发现的问题如下:
1.退出登录时权限没有废除,后续无论什么角色登录都是同样的权限,这里检查了一下,可能是在SysUserTokenServiceImpl的logout()方法中退出登录只是删除了数据库中的token(同时这里有个小疑问,token存数据库的目的是什么?),而没有使用SecurityUtils.getSubject().logout();废除用户权限
2.角色菜单更新失效,这里检查了一下应该是缺少了SysRoleController的修改角色方法中缺少了sysRoleMenuService.saveOrUpdate(role.getRoleId(),role.getMenuIdList());更新权限的语句
3.生成模板中大小写mapper(应当大写,但是这里模板中是小写)问题:这个之前有在框架讨论群中咨询过,生成模板需要统一才能自定义Mapper内容,否则映射不上,还要抛异常
4.SysRoleMenuServiceImpl中保存角色菜单时,原本是直接根据角色和菜单所关联的这个ID删除,其实逻辑上应按照roleId删除,我理解这个保存函数的步骤是先删除当前角色的所有权限,再将新权限赋给当前角色。
您好,
我使用的X-SpringBoot版本为2.1.2,请问本框架是否支持多数据源配置?
如果可以请问如何配置?
html,js缓存,刷新页面依然存在,楼主怎么解决的?
swagger-ui上面的接口测试会发生跨域问题,测试不通过。看看咋处理
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.