Spring中Bean的作用域有五种,分别是singleton、prototype、request、session、globalSession。其中request、session、globalSession这三个作用域只有在web开发中才会使用到。 当在 Spring 中定义一个bean时,你必须声 ...
分类:
编程语言 时间:
2020-03-20 12:21:32
阅读次数:
75
spring boot 项目想要连接hive库的时候 需要导入两个jar包hadoop-common-2.5.1.jar和hive-jdbc-1.2.1 在导入的之后原来的项目启动报错具体如下 org.springframework.beans.factory.UnsatisfiedDependen ...
分类:
编程语言 时间:
2020-03-20 10:54:27
阅读次数:
222
1.使用注解的方式需要配置applicationContext.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http ...
分类:
编程语言 时间:
2020-03-19 23:16:17
阅读次数:
109
1. applicationContext.xml配置 >此xml命名不可更改 <?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="ht ...
分类:
编程语言 时间:
2020-03-18 11:53:11
阅读次数:
78
通过一个学生选择课程的demo 以3中不同的实现方式理解一下springIOC,体会IOC的好处: 声明一个ICourse接口: package org.ks.newinstance; public interface ICourse { void learn(); //学习。。。。 } 两个ICo ...
分类:
编程语言 时间:
2020-03-17 00:08:20
阅读次数:
88
在eclipse中开发网页时,经常会遇到写xml文件时第一行无缘无故报错。在最左面的行数上面报出一个小红叉, 点击查看错误信息:Referenced file contains errors (http://www.springframework.org/schema/beans......之类的。 ...
分类:
其他好文 时间:
2020-03-15 14:59:50
阅读次数:
64
spring 项目可以通过注解方式使用 nacos-client 使用示例 @Configuration @EnableNacosConfig(globalProperties = @NacosProperties(serverAddr = "127.0.0.1:8848")) @NacosProp ...
分类:
编程语言 时间:
2020-03-14 16:22:02
阅读次数:
328
一 、认证服务器上发Token的改造:uuid字符串改造为JWT 之前生成的token都是一个无意义的字符串uuid,也存在着上一篇 https://www.cnblogs.com/lihaoyang/p/12203586.html 所说的几个问题。本篇就要把token改造成JWT。 在认证服务器配 ...
分类:
编程语言 时间:
2020-03-14 12:57:05
阅读次数:
75
使用CloudWatch Logs监控Apache日志文件
分类:
Web程序 时间:
2020-03-14 09:21:00
阅读次数:
113
严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerorg.springframework ...
分类:
移动开发 时间:
2020-03-13 18:52:07
阅读次数:
92