- 请假代码java web_学生请假管理系统
喵灵魂
请假代码javaweb
文件名大小更新时间学生请假管理系统02019-05-31学生请假管理系统\Leave_System02019-05-31学生请假管理系统\Leave_System\.classpath9092019-05-01学生请假管理系统\Leave_System\.project9122019-04-29学生请假管理系统\Leave_System\.settings02019-05-31学生请假管理系统\L
- SpringBoot中资源可以默认被访问的路径
76e
场景:SpringBoot项目中新建一个html文件,那么这个文件放在哪些路径下时可以无需配置,默认就能被访问?IDEA中新建SpringBoot项目,找到SpringBoot源码文件ResourceProperties.class源码文件ResourceProperties.class重点关注这行代码:privatestaticfinalString[]CLASSPATH_RESOURCE_LO
- Gradle:Using flatDir should be avoided because it doesn‘t support any meta-data formats.
SportHappy
android开发androidgradleandroid-studio
app.gradle代码段1:repositories{flatDir{dirs'libs'}}代码段2:dependencies{classpath"com.android.tools.build:gradle:4.2.2"}Gradle升级4.2.2后,编译会出现如下提示信息,删除即可解决问题UsingflatDirshouldbeavoidedbecauseitdoesn'tsupporta
- SpringBoot随记
xlz1786734790
javaspringboot随记
SpringBoot注解ImportResource的使用SpringBoot提倡构建零配置文件项目,但当需引入其他配置文件时可以在SpringBoot启动类上加@ImportResource注解,即可将该引入注解加载到SpringBoot容器中。@SpringBootApplication@ImportResource(locations={"classpath:文件"})publicclass
- Python - sys.path
kcp606
Python
sys.pathDoc:Pythonpathsys.path是指定模块的搜索路径的字符串列表。类似于Java的ClassPath,Go的GOPATH,让解释器知道去哪找包查看系统的sys.path,进入交互解释器执行:importsysprint("\n".join(sys.path))修改sys.path的各种方式代码中直接添加,执行就生效,程序结束就失效#假如有如下两个文件在不同的包下#/sr
- SpringMVC 开发
long19901216
javaSpringMVCjavahtml交互
一、SpringMVC基础入门,创建一个HelloWorld程序1.首先,导入SpringMVC需要的jar包。2.添加Web.xml配置文件中关于SpringMVC的配置123456789101112131415springmvcorg.springframework.web.servlet.DispatcherServletcontextConfigLocationclasspath:spri
- 项目部署实现开机自动启动tomcat和谷歌浏览器 并全屏访问自己部署的项目
Mystery、Yu
项目部署流程web项目部署开机启动tomcat开机全屏打开谷歌浏览器
项目部署实现开机自动启动tomcat和谷歌浏览器并全屏访问自己部署的项目安装部署流程:1:jdk安装(环境变量配置)JAVA_HOMEPATHclasspath2:tomcate安装(环境变量设置)CATALINA_HOME(tomcate所在目录)CATALINA_BASE(tomcate所在目录)Path(tomcatebin所在目录)3:整合Tomcat到服务器中注意是配置jdk和tomca
- @Autowired获取配置文件中被注入实例的两种方式
weixin_30719711
java
一、说明二、那么在JavaBean中如何通过@Autowired获取该实例呢?有两种方式:1.直接获取@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration("classpath:applicationContext_test.xml")publicclassMyTest1{@AutowiredprivateHibernateTem
- 错误: 找不到或无法加载主类 org.apache.flume.tools.GetJavaProperty
小波2200013045
flume大数据
[root@master~]#flume-ngversion[root@master~]#cd/usr/local/flume/bin[root@masterbin]#vimflume-ng配置文件中加入红框代码#determineHBASEjava.library.pathandusethatforflumelocalHBASE_CLASSPATH=""localHBASE_JAVA_LIBRA
- Spring框架(6)
秋意钟
springjava数据库
搭建SpringMVC+Spring+JDBC框架,需要在web.xml中装载Spring框架的相关配置文件,并需要配置ContextLoaderListener示例代码在web.xml中配置监听器contextConfigLocationclasspath:applicationContext-*.xmlorg.springframework.web.context.ContextLoaderL
- linux打jar包xml文件,springboot打jar包部署外置配置文件
胡佳威
linux打jar包xml文件
一、读取配置文件的优先级默认:Jar包同级目录的config目录Jar包同级目录classPath(即resources目录)的config目录classpath目录最高优先级的方式是项目启动时通过命令的方式指定项目加载核心配置文件,命令如下java–jarxxxx.jar-Dspring.config.location=xxx/xxx/xxxx.properties如果SpringBoot在优先
- SpringBoot-读取classpath下文件
依然饭太稀
开发过程中,必不可少的需要读取文件,对于打包方式的不同,还会存在一些坑,比如以jar包方式部署时,文件都存在于jar包中,某些读取方式在开发工程中都可行,但是打包后,由于文件被保存在jar中,会导致读取失败。这时就需要通过类加载器读取文件,类加载器可以读取jar包中的class类当然也可以读取jar包中的文件。//方法1:获取文件或流this.getClass().getResource("/")
- ApplicationContext介绍
youcey
java开发spring
如果说BeanFactory是Spring的心脏,那么ApplicationContext就是完整的身躯了。ApplicationContext由BeanFactory派生而来,提供了更多面向实际应用的功能。ApplicationContext类体系结构ApplicationContext的主要实现类是ClassPathXmlApplicationContext和FileSystemXmlAppl
- SpringMVC-02 第一个SpringMVC程序
张小驰出没
SpringMVCspringmvcssm
SpringMVC-02第一个SpringMVC程序第一个SpringMVC程序配置版新建一个Moudle,springmvc-02-hello,确定依赖导入进去了1.配置web.xmlspringmvcorg.springframework.web.servlet.DispatcherServletcontextConfigLocationclasspath:springmvc.xml1spri
- 启动Application 报错:no mapping for GET /(已解决)
qq_3512323979
javaspringbootspring
根据以上内容,帮助我顺利解决了此问题自己的错误:因为我使用的是框架嘛,然后生成了一个SpringBoot项目后,resources下面就会有一个static的类,用于存放静态资源类,后面我把静态资源放在里面,但是启动启动类后,报错一直匹配不到。分析原因:正常的话,我们使用SpringBoot框架,他会给我们提供许多便利,包括静态资源的自动服务,默认的话,他会去/static(classpath:/
- flink报错找不到类java.lang.NoClassDefFoundError: org/apache/flink/streaming/api/datastream/DataStream
搞数据的小杰
flinkjavaapache
问题:解决方法:把这个Adddependencieswith"provided"scopetoclasspath勾选上
- VSCode搭建Hzero(SpringCloud架构)后端开发调试环境
X_ABU
vscodespringcloud架构编辑器Hzero
正常情况下我们使用IDEA开发Hzero,但是有的公司是不允许破解或者使用IDEA的,此时可以使用eclipse来替代也是可以的,最近尝试使用VSCode来开发调试发现了一些问题其中最大的问题是Vscdoe在绝大多数情况下是不能直接运行Hzero,使用插件也不好使,特别是会抛出部分bean无法创建,此时在IDEA可以通过调整Shortencommandline为classpathfile来解决当然
- 后端主流框架--Spring02
Lill_bin
java数据库mysqlmybatisspringspringbootspringcloud后端
前言:上篇关于Spring的文章介绍了一些Spring的基本知识,此篇文章主要分享一下如何配置Spring环境,如何注入等。Spring项目构建导入Spring相关JAR包org.springframeworkspring-context5.2.4.RELEASE准备Spring配置文件在classpath的根目录下新建一个applicationContext.xml配置文件,文件名可以自定义,但
- SSM 整合使用 @PropertySource 问题
Gambler_Tu
spring数据库javaspring
SSM整合使用@PropertySource问题如果你想将数据库连接的相关属性移入一个classpath下的“.properties”文件中,让后再在上述配置类中结合@PropertySource和@Value来加载.properties配置文件,引入相关属性值,那么,你会发现一个问题,你的@Value读取到的属性值都是null!造成这个现象的原因在在于,我们是使用的MapperScannerCo
- ReactNative项目升级Gradle
fbean
reactnativeandroidgradle
1、在Gradle下载网站找到需要的版本地址2、修改android根目录文件:gradle/wrapper/gradle-wrapper.properties,将distributionUrl属性修改为1中找到的地址3、找到根目录build.gradle文件,修改classpath,调整android插件版本,具体对应版本如下:插件版本所需的Gradle版本1.0.0-1.1.32.2.1-2.3
- 十:使用@Value注解配置文件自动映射到属性和实体类
董小姐orz(娜)
springspringboot
配置文件加载#微信支付的appidwxpay.appid=w23432432432#支付密钥wxpay.sercret=sfweinkkk#微信支付商户号wx.mechid=324324方式一:①controller上面配置@PropertySource("classpath:resource.properties")②增加属性@Value("${test.name}")packagecom.gd
- SpringBoot项目打成jar包后resource下文件的读取
千星流
springbootjava
SpringBoot项目打成jar包后resource下文件的读取前言原因分析ResourceUtilsClassPathResourceClassLoader前言前几天在开发中遇到一个问题,有个cert文件需要读取,但是搞了好久才解决。所以做个标记防止自己忘记。文件放置的位置如图原因分析我们开发的时候文件一般是可以读取的,但是在打成jar包之后,文件就获取不到,出现FileNotFoundExc
- SpringBoot 打成jar包后如何获取jar包Resouces下的文件
hello_realWorld
springbootjar后端
获取resouces下的文件使用以下代码即可读取,如果需要变成file传入其他的方法中,需要创建临时文件将输入流文件复制到临时文件中,并传入相关方法,最后删除临时文件即可。不能通过ClassPathResouce对象直接获取文件FileClassPathResourceclassPathResource=newClassPathResource("/libs/libkrandroid.so");I
- 如何打开java工程文件_如何打开用eclipse没有.project文件的Java工程
阿荣田Toronto
如何打开java工程文件
大概分为以下7个步骤,具体如下:1、在你的eclipse下新建一个与你想要打开的源代码项目同名的一个项目(我这举例叫myweb)。2、在电脑磁盘中找到刚刚新建的项目,把它生成的.project文件拷贝到你的源代码项目中,若是源代码里面没有.classpath也一并拷贝过去。3、此时eclipse就能打开你的源代码项目了。4、打开eclipse,点击File,点击Import,进入导入项目界面。5、
- Spring6学习技术|IoC到生命周期
半夜下雨
Java技术学习学习spring
学习材料尚硅谷Spring零基础入门到进阶,一套搞定spring6全套视频教程(源码级讲解)IoC控制反转。是一种设计思想。1.获取bean对象的方法通过id,通过class,和双重方式。ApplicationContextcontext=newClassPathXmlApplicationContext("bean.xml");Useruser=(User)context.getBean("us
- spring-context
码农崛起
1,ApplicationContextApplicationContext-1.pngApplicationContext-2.png分析一下基于xml的ClassPathXmlApplicationContext和GenericXmlApplicationContext,以及基于注解的AnnotationConfigApplicationContext的实现机制2,ClassPathXmlAp
- classpath:springmvc.xml
lvpflv
SpringMVCjavaspring
dispatcherServletorg.springframework.web.servlet.DispatcherServletcontextConfigLocationclasspath:springmvc.xml如果不用指定的springmvc配置文件的路径,那么DispatcherServlet会自动到/WEB-INF下找指定名字的配置文件默认配置文件名为-servlet.xmldisp
- 生产环境下,应用模式部署flink任务,通过hdfs提交
但行益事莫问前程
flinkflink
前言 通过通过yarn.provided.lib.dirs配置选项指定位置,将flink的依赖上传到hdfs文件管理系统1.实践 (1)生产集群为cdh集群,从cm上下载配置文件,设置环境exportHADOOP_CONF_DIR=/home/conf/authexportHADOOP_CLASSPATH=`hadoopclasspath` (2)上传flink的lib和plugins、自己
- 二.重新回炉Spring Framework:Spring Framework主要组件概览
泗水长流
springSpringFrameworkspring框架概览spring框架主要类图BeanFactoryBeanDefinitionResourceLoaderApplication上下文
1.写在前面的话这里主要简单说一下SpringFramework的几个核心组件的总体情况。为了比较直观,这里使用了ClassPathXmlApplicationContext的类图来进行说明。它基本上包含了IoC体系中大部分的核心类和接口。类图如下图所示:2.Resource组件体系Resource相关组件基本都在org.springframework.core.io包下,包括Resource和R
- kafka命令行操作
叶惠美zz
kafka
kafka命令行操作:配置环境变量:exportJAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdkexportJRE_HOME=${JAVA_HOME}/jreexportCLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATHexportJAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME
- SAX解析xml文件
小猪猪08
xml
1.创建SAXParserFactory实例
2.通过SAXParserFactory对象获取SAXParser实例
3.创建一个类SAXParserHander继续DefaultHandler,并且实例化这个类
4.SAXParser实例的parse来获取文件
public static void main(String[] args) {
//
- 为什么mysql里的ibdata1文件不断的增长?
brotherlamp
linuxlinux运维linux资料linux视频linux运维自学
我们在 Percona 支持栏目经常收到关于 MySQL 的 ibdata1 文件的这个问题。
当监控服务器发送一个关于 MySQL 服务器存储的报警时,恐慌就开始了 —— 就是说磁盘快要满了。
一番调查后你意识到大多数地盘空间被 InnoDB 的共享表空间 ibdata1 使用。而你已经启用了 innodbfileper_table,所以问题是:
ibdata1存了什么?
当你启用了 i
- Quartz-quartz.properties配置
eksliang
quartz
其实Quartz JAR文件的org.quartz包下就包含了一个quartz.properties属性配置文件并提供了默认设置。如果需要调整默认配置,可以在类路径下建立一个新的quartz.properties,它将自动被Quartz加载并覆盖默认的设置。
下面是这些默认值的解释
#-----集群的配置
org.quartz.scheduler.instanceName =
- informatica session的使用
18289753290
workflowsessionlogInformatica
如果希望workflow存储最近20次的log,在session里的Config Object设置,log options做配置,save session log :sessions run ;savesessio log for these runs:20
session下面的source 里面有个tracing 
- Scrapy抓取网页时出现CRC check failed 0x471e6e9a != 0x7c07b839L的错误
酷的飞上天空
scrapy
Scrapy版本0.14.4
出现问题现象:
ERROR: Error downloading <GET http://xxxxx CRC check failed
解决方法
1.设置网络请求时的header中的属性'Accept-Encoding': '*;q=0'
明确表示不支持任何形式的压缩格式,避免程序的解压
- java Swing小集锦
永夜-极光
java swing
1.关闭窗体弹出确认对话框
1.1 this.setDefaultCloseOperation (JFrame.DO_NOTHING_ON_CLOSE);
1.2
this.addWindowListener (
new WindowAdapter () {
public void windo
- 强制删除.svn文件夹
随便小屋
java
在windows上,从别处复制的项目中可能带有.svn文件夹,手动删除太麻烦,并且每个文件夹下都有。所以写了个程序进行删除。因为.svn文件夹在windows上是只读的,所以用File中的delete()和deleteOnExist()方法都不能将其删除,所以只能采用windows命令方式进行删除
- GET和POST有什么区别?及为什么网上的多数答案都是错的。
aijuans
get post
如果有人问你,GET和POST,有什么区别?你会如何回答? 我的经历
前几天有人问我这个问题。我说GET是用于获取数据的,POST,一般用于将数据发给服务器之用。
这个答案好像并不是他想要的。于是他继续追问有没有别的区别?我说这就是个名字而已,如果服务器支持,他完全可以把G
- 谈谈新浪微博背后的那些算法
aoyouzi
谈谈新浪微博背后的那些算法
本文对微博中常见的问题的对应算法进行了简单的介绍,在实际应用中的算法比介绍的要复杂的多。当然,本文覆盖的主题并不全,比如好友推荐、热点跟踪等就没有涉及到。但古人云“窥一斑而见全豹”,希望本文的介绍能帮助大家更好的理解微博这样的社交网络应用。
微博是一个很多人都在用的社交应用。天天刷微博的人每天都会进行着这样几个操作:原创、转发、回复、阅读、关注、@等。其中,前四个是针对短博文,最后的关注和@则针
- Connection reset 连接被重置的解决方法
百合不是茶
java字符流连接被重置
流是java的核心部分,,昨天在做android服务器连接服务器的时候出了问题,就将代码放到java中执行,结果还是一样连接被重置
被重置的代码如下;
客户端代码;
package 通信软件服务器;
import java.io.BufferedWriter;
import java.io.OutputStream;
import java.io.O
- web.xml配置详解之filter
bijian1013
javaweb.xmlfilter
一.定义
<filter>
<filter-name>encodingfilter</filter-name>
<filter-class>com.my.app.EncodingFilter</filter-class>
<init-param>
<param-name>encoding<
- Heritrix
Bill_chen
多线程xml算法制造配置管理
作为纯Java语言开发的、功能强大的网络爬虫Heritrix,其功能极其强大,且扩展性良好,深受热爱搜索技术的盆友们的喜爱,但它配置较为复杂,且源码不好理解,最近又使劲看了下,结合自己的学习和理解,跟大家分享Heritrix的点点滴滴。
Heritrix的下载(http://sourceforge.net/projects/archive-crawler/)安装、配置,就不罗嗦了,可以自己找找资
- 【Zookeeper】FAQ
bit1129
zookeeper
1.脱离IDE,运行简单的Java客户端程序
#ZkClient是简单的Zookeeper~$ java -cp "./:zookeeper-3.4.6.jar:./lib/*" ZKClient
1. Zookeeper是的Watcher回调是同步操作,需要添加异步处理的代码
2. 如果Zookeeper集群跨越多个机房,那么Leader/
- The user specified as a definer ('aaa'@'localhost') does not exist
白糖_
localhost
今天遇到一个客户BUG,当前的jdbc连接用户是root,然后部分删除操作都会报下面这个错误:The user specified as a definer ('aaa'@'localhost') does not exist
最后找原因发现删除操作做了触发器,而触发器里面有这样一句
/*!50017 DEFINER = ''aaa@'localhost' */
原来最初
- javascript中showModelDialog刷新父页面
bozch
JavaScript刷新父页面showModalDialog
在页面中使用showModalDialog打开模式子页面窗口的时候,如果想在子页面中操作父页面中的某个节点,可以通过如下的进行:
window.showModalDialog('url',self,‘status...’); // 首先中间参数使用self
在子页面使用w
- 编程之美-买书折扣
bylijinnan
编程之美
import java.util.Arrays;
public class BookDiscount {
/**编程之美 买书折扣
书上的贪心算法的分析很有意思,我看了半天看不懂,结果作者说,贪心算法在这个问题上是不适用的。。
下面用动态规划实现。
哈利波特这本书一共有五卷,每卷都是8欧元,如果读者一次购买不同的两卷可扣除5%的折扣,三卷10%,四卷20%,五卷
- 关于struts2.3.4项目跨站执行脚本以及远程执行漏洞修复概要
chenbowen00
strutsWEB安全
因为近期负责的几个银行系统软件,需要交付客户,因此客户专门请了安全公司对系统进行了安全评测,结果发现了诸如跨站执行脚本,远程执行漏洞以及弱口令等问题。
下面记录下本次解决的过程以便后续
1、首先从最简单的开始处理,服务器的弱口令问题,首先根据安全工具提供的测试描述中发现应用服务器中存在一个匿名用户,默认是不需要密码的,经过分析发现服务器使用了FTP协议,
而使用ftp协议默认会产生一个匿名用
- [电力与暖气]煤炭燃烧与电力加温
comsci
在宇宙中,用贝塔射线观测地球某个部分,看上去,好像一个个马蜂窝,又像珊瑚礁一样,原来是某个国家的采煤区.....
不过,这个采煤区的煤炭看来是要用完了.....那么依赖将起燃烧并取暖的城市,在极度严寒的季节中...该怎么办呢?
&nbs
- oracle O7_DICTIONARY_ACCESSIBILITY参数
daizj
oracle
O7_DICTIONARY_ACCESSIBILITY参数控制对数据字典的访问.设置为true,如果用户被授予了如select any table等any table权限,用户即使不是dba或sysdba用户也可以访问数据字典.在9i及以上版本默认为false,8i及以前版本默认为true.如果设置为true就可能会带来安全上的一些问题.这也就为什么O7_DICTIONARY_ACCESSIBIL
- 比较全面的MySQL优化参考
dengkane
mysql
本文整理了一些MySQL的通用优化方法,做个简单的总结分享,旨在帮助那些没有专职MySQL DBA的企业做好基本的优化工作,至于具体的SQL优化,大部分通过加适当的索引即可达到效果,更复杂的就需要具体分析了,可以参考本站的一些优化案例或者联系我,下方有我的联系方式。这是上篇。
1、硬件层相关优化
1.1、CPU相关
在服务器的BIOS设置中,可
- C语言homework2,有一个逆序打印数字的小算法
dcj3sjt126com
c
#h1#
0、完成课堂例子
1、将一个四位数逆序打印
1234 ==> 4321
实现方法一:
# include <stdio.h>
int main(void)
{
int i = 1234;
int one = i%10;
int two = i / 10 % 10;
int three = i / 100 % 10;
- apacheBench对网站进行压力测试
dcj3sjt126com
apachebench
ab 的全称是 ApacheBench , 是 Apache 附带的一个小工具 , 专门用于 HTTP Server 的 benchmark testing , 可以同时模拟多个并发请求。前段时间看到公司的开发人员也在用它作一些测试,看起来也不错,很简单,也很容易使用,所以今天花一点时间看了一下。
通过下面的一个简单的例子和注释,相信大家可以更容易理解这个工具的使用。
- 2种办法让HashMap线程安全
flyfoxs
javajdkjni
多线程之--2种办法让HashMap线程安全
多线程之--synchronized 和reentrantlock的优缺点
多线程之--2种JAVA乐观锁的比较( NonfairSync VS. FairSync)
HashMap不是线程安全的,往往在写程序时需要通过一些方法来回避.其实JDK原生的提供了2种方法让HashMap支持线程安全.
- Spring Security(04)——认证简介
234390216
Spring Security认证过程
认证简介
目录
1.1 认证过程
1.2 Web应用的认证过程
1.2.1 ExceptionTranslationFilter
1.2.2 在request之间共享SecurityContext
1
- Java 位运算
Javahuhui
java位运算
// 左移( << ) 低位补0
// 0000 0000 0000 0000 0000 0000 0000 0110 然后左移2位后,低位补0:
// 0000 0000 0000 0000 0000 0000 0001 1000
System.out.println(6 << 2);// 运行结果是24
// 右移( >> ) 高位补"
- mysql免安装版配置
ldzyz007
mysql
1、my-small.ini是为了小型数据库而设计的。不应该把这个模型用于含有一些常用项目的数据库。
2、my-medium.ini是为中等规模的数据库而设计的。如果你正在企业中使用RHEL,可能会比这个操作系统的最小RAM需求(256MB)明显多得多的物理内存。由此可见,如果有那么多RAM内存可以使用,自然可以在同一台机器上运行其它服务。
3、my-large.ini是为专用于一个SQL数据
- MFC和ado数据库使用时遇到的问题
你不认识的休道人
sqlC++mfc
===================================================================
第一个
===================================================================
try{
CString sql;
sql.Format("select * from p
- 表单重复提交Double Submits
rensanning
double
可能发生的场景:
*多次点击提交按钮
*刷新页面
*点击浏览器回退按钮
*直接访问收藏夹中的地址
*重复发送HTTP请求(Ajax)
(1)点击按钮后disable该按钮一会儿,这样能避免急躁的用户频繁点击按钮。
这种方法确实有些粗暴,友好一点的可以把按钮的文字变一下做个提示,比如Bootstrap的做法:
http://getbootstrap.co
- Java String 十大常见问题
tomcat_oracle
java正则表达式
1.字符串比较,使用“==”还是equals()? "=="判断两个引用的是不是同一个内存地址(同一个物理对象)。 equals()判断两个字符串的值是否相等。 除非你想判断两个string引用是否同一个对象,否则应该总是使用equals()方法。 如果你了解字符串的驻留(String Interning)则会更好地理解这个问题。
- SpringMVC 登陆拦截器实现登陆控制
xp9802
springMVC
思路,先登陆后,将登陆信息存储在session中,然后通过拦截器,对系统中的页面和资源进行访问拦截,同时对于登陆本身相关的页面和资源不拦截。
实现方法:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23