`
文章列表

freemarker

1.在使用freemarker 编程时,如果给变量赋值对象为null时,就会出现在异常 如:<#assign selfname = ProductHelper.getAddProductSelfAddressRel(book.id) /> 当 ProductHelper.getAddProductSelfAddressRel(book.id) 返回值为null时,出现异常 ProductHelper.getAddProductSelfAddressRel(book.id) is undefined. It cannot be assigned to selfname 如何处理呢: ...
公司目前使用的nginx版本比较低(nginx-1.0.12),请网络安全公司做了一下“远程安全评估”,发现有下列漏洞: nginx URI处理安全限制绕过漏洞(CVE-2013-4547) Nginx 'access.log'不安全文件权限漏洞(CVE-2013-0337) nginx SSL会话固定漏洞(CVE-2014-3616) nginx resolver 拒绝服务漏洞(CVE-2016-0747) nginx resolver 拒绝服务漏洞(CVE-2016-0742) nginx 'ngx_http_mp4_module.c'缓冲区溢出漏洞 nginx标头解析内存泄露漏洞 ngin ...
1.使用sudo lightdm 启用默认界面,发现没有安装,然后执行 sudo apt-get install lightdm 进行安装 然后执行 sudo lightdm 启动界面, 但是输入密码后提示: Failed to load session “ubuntu 使用下面步骤解决: sudo apt-get update sudo apt-get install ubuntu-desktop sudo apt-get -f install sudo dpkg-reconfigure ubuntu-desktop sudo reboot
1.加载类jar <dependency>         <groupId>org.jasypt</groupId>         <artifactId>jasypt</artifactId>         <version>1.9.2</version>     </dependency>     <!-- https://mvnrepository.com/artifact/org.jasypt/jasypt-spring31 -->     <dependency&g ...
在项目上,单击右键“git bash here”,然后输入 git status  发现有很多untracked files 文件,如图: 如何隐藏这些untracked files 文件 1.建立.gitgnore 文件必须放在项目的根目录 (如项目名称为testpro,这个文件需要放在testpro文件夹下面) 2.把需要隐藏的文件写入.gitgnore 如写入内容为: .idea/artifacts/ .idea/compiler.xml .idea/dictionaries/ .idea/encodings.xml .idea/kotlinc.xml .idea/librari ...
1.在pom.xml文件中添加: <!--myibatis3 自动生成配置xml文件插件 --> <plugins>     <plugin>         <groupId>org.mybatis.generator</groupId>         <artifactId>mybatis-generator-maven-plugin</artifactId>         <version>1.3.2</version>         <configuration> ...
1.构建项目 ctr + F9 或者 build->build project  2.单击右上角的“edit configurtions ” 如图 3.单击“+” 选择“tomcat” 中的local ,如图: 4.设置发布信息:如图:
<jjwt.version>0.6.0</jjwt.version> <fastjson.version>1.2.16</fastjson.version>        <dependency>     <groupId>io.jsonwebtoken</groupId>     <artifactId>jjwt</artifactId>     <version>${jjwt.version}</version> </dependency& ...
Nginx 配置和说明: #定义Nginx运行的用户和用户组     user www www;          #nginx进程数,建议设置为等于CPU总核心数。     worker_processes 4;          #全局错误日志定义类型,[ debug | info | notice | warn | error | crit ]     error_log ar/loginx/error.log notice;          #进程文件     pid ar/runinx.pid;          #一个nginx进程打开的最多文件描述符 ...
匹配网址URL的正则表达式:[a-zA-z]+://[^\s]* 匹配帐号是否合法(字母开头,允许5-16字节,允许字母数字下划线):^[a-zA-Z][a-zA-Z0-9_]{4,15}$ 评注:表单验证时很实用 匹配国内电话号码:\d{3}-\d{8}|\d{4}-\d{7} 评注:匹配形式如 0511-4405222 或 021-87888822 匹配中国邮政编码:[1-9]\d{5}(?!\d) 评注:中国邮政编码为6位数字 匹配身份证:\d{15}|\d{18} 评注:中国的身份证为15位或18位 匹配特定数字: ^[1-9]\d*$    //匹配正整数 ^-?[1-9]\d*$   ...
Linux 中的tomcat远程调试代码 1,是要编辑catalina.sh文件。  而且要改成这 样:CATALINA_OPTS="-server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5888"  2.eclipse 中设置: A: b c
使用spring3.2.9 集成多视图,可以使用jsp页面,ftl页面,vm页面。 源代码在附件中 主要配置: <bean id="freemarkConfig" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="location" value="classpath:freemark.properties" /> </bean> <b ...
1.在项目上单击右键-》新建文件夹(如:lib) 2.在pom.xml 加入下面文件: <dependency> <groupId>dubbo</groupId> <artifactId>dubbo</artifactId> <version>2.8.4</version> <scope>system</scope> <!--引入路径 --> <systemPath>${project.basedir}/lib/dubbo-2.8.4.jar ...

velcocity 学习

程序源代码在附件中 <!DOCTYPE html> <html>     <head>         <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">         <title>data binding</title>     </head>         <body>         <h2>Hello World VM! $name</h2& ...
Velocity,名称字面翻译为:速度、速率、迅速,用在Web开发里.Velocity是一种Java模版引擎技术,该项目由Apache提出,由另外一种引擎技术Webmacro引深而来。那什么是官方的Velocity定义呢?Apache对它的定义是:一种基于Java的模板引擎,但允许任何人使用简单而强大的模板语言来引用定义在Java代码中的对象. 程序代码在附件压缩包中:boce-all-velocityweb.zip 1下载依赖包配置文件在附件中 2.设置layout-servlet.xml 文件 <bean id="velocityConfig" class ...
Global site tag (gtag.js) - Google Analytics