摘要: 单例模式的实现方式有很多,常用的是双重检测锁方式,优点是代码简单,逻辑清晰,缺点是极其稀少情况下会失效。 当然,用枚举方式或静态内部类方式更值得推荐。 总之,作为反模式应用,这个算简单高效的。示例如下: 阅读全文
posted @ 2018-09-08 00:57 god with us 阅读(509) 评论(0) 推荐(0) 编辑
摘要: Authority 权限Credential 证书Grant 授予 Authentication 身份验证 以下,我们将通过四步,逐步实现spring-security的username+password身份验证的登录功能。 一、添加spring-boot-start-security依赖即可实现默 阅读全文
posted @ 2018-06-08 17:57 god with us 阅读(925) 评论(0) 推荐(0) 编辑
摘要: 导入的maven项目pom.xml现红叉 分析原因:在maven本地仓库中找不到相应的jar包。 解决方案:让maven强制更新依赖。 项目右击菜单,Maven -> Update Project... (eclipse快捷键为:Alt + F5) 打开Update Maven Project对话框 阅读全文
posted @ 2018-06-03 16:21 god with us 阅读(1132) 评论(0) 推荐(0) 编辑
摘要: SpringBoot 也算AI吧,它根据您架构中引用的依赖,自动化地按默认方案帮您完成了Spring那些复杂繁琐的配置工作。为了让您不会看低此 AI 水平,还特地喊出了“约定大于配置”的口号。从这个角度看,SpringBoot 就是基础架构搭建工具,与系统业务逻辑实现没什么关系,这和Maven有点类 阅读全文
posted @ 2018-05-31 13:54 god with us 阅读(259) 评论(0) 推荐(0) 编辑
摘要: 烦人的版本兼容问题 没有使用sts3.7.3系统内嵌的maven3.3.3,调整为稍高版本的maven3.5.2,懒得修改配置了。 升级eclipse插件吧。 Eclipse,Help -> Installation Details 找到插件m2e connector for mavenarchiv 阅读全文
posted @ 2018-05-29 23:28 god with us 阅读(849) 评论(0) 推荐(0) 编辑
摘要: sts下载地址:https://spring.io/tools/sts/legacy 虽然sts内置了版本对应的eclipse,仍推荐使用当前环境下稳定使用的eclipse版本。 Start 找到eclipse的版本号,例如:Mars2对应的eclipse版本号为4.5.2 打开sts下载站点(ht 阅读全文
posted @ 2018-05-29 16:13 god with us 阅读(9626) 评论(0) 推荐(1) 编辑
摘要: eclipse启动闪退 打开eclipse安装文件夹中的eclipse.ini文件。 把Xmx1024m修改为Xmx512m,可以解决闪退问题。 阅读全文
posted @ 2018-05-29 14:12 god with us 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Mybatis运行出现错误提示: 五月 23, 2018 12:07:22 上午 org.springframework.jdbc.support.SQLErrorCodesFactory <init>信息: SQLErrorCodes loaded: [DB2, Derby, H2, HDB, H 阅读全文
posted @ 2018-05-23 00:25 god with us 阅读(1823) 评论(0) 推荐(0) 编辑
摘要: 问:Bootstrap是什么? 答:开源的前端框架,就是一些事先写好的css、js等。 问:Bootstrap在哪儿下载? 答:官方(https://getbootstrap.com/),中文(http://www.bootcss.com/) 问:Bootstrap怎么用? 答:网页中引入css等, 阅读全文
posted @ 2018-05-09 00:07 god with us 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Nexus启动失败 wrapper.log记载: 无支持版本 51.0,版本51.0指的是Java1.7。 分析: nexus版本为2.14.8,适用JRE版本为1.7。 已配置JAVA_HOME为1.7版。 cmd中,java -version,显示版本为1.6,怪了。 的确本机上也有1.6版。 阅读全文
posted @ 2018-05-08 20:38 god with us 阅读(623) 评论(0) 推荐(0) 编辑