GeniusV

We are the Geek.

Cached Shiro and Session Managment with Redis

Redis !!!!!!!

Table of Content Shiro SecurityManager SessionManager SessionDao CacheManager JedisShiroCache JedisDao Contact Shiro SecurityManager Today, ...

Mybatis Generator Usage

Table of Content Main Structure validate method sqlMapDocumentGenerated method clientGenerated method How to run it Changelog Contact Main Structure T...

What is RESTful

REST:Representation State Transfer. For exanple, if you want to browse someone’s blog, you will tell the sever “I want the list of articles”.Then, the server will return the resource back. After t...

How to create a web app in Idea with gradle

choose File -> new -> project choose Gradel choose SDK choose Java and Web on the right panel choose next enter GroupId and Aritfictid change Version to 0.0.1-SNAPSHOT choose...

Kill Process

Force to kill the process 2472 tasklist|findstr 2472 taskkill /pid 2472 -t -f

NamedParameterJDBCTemplate

NamedParameterJDBCTemplate 若有多个参数,则不用对应位置, 直接对应参数名。缺点时是麻烦 DEMO: @Test public void testNamedParameterJDBCTemplate(){ String sql = "insert into employees(last_name, e_mail, id) values (...

Spring Transaction

Transaction Transaction 的属性: propagation 指定事务的传播行为,即当前的事务方法被另外一个事务方法调用时如何使用事务, 默认取值为 REQUIRED , 即使用调用方法的事务。 isolation 指定事务的隔离级别,最常用的取值为 READ_COMMITTED. rol...

关于 MySQL 的默认字符集

MySQL 默认字符集为 latin1 ,可以通过运行命令: SHOW variables like '%char%'; 查看。 运行以下命令来修改默认字符集: SET character_set_client = utf8 ; SET character_set_connection = utf8 ; SET character_set_database = utf8 ; SET...

MySQL ERROR 1054(28000) 的解决方案 For Mac

It ruined my night.

System: mac os 10.12.2 刚装好 MySQL 的时候会弹框告诉你初始的root密码。但是那个密码登过一次之后有可能会过期,出现错误: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password) 这时候我们要重置root密码并设置密码永不过期。 解决方案 先在 P...

Virtualenv 的使用

环境的复制和迁移 虚拟环境如果直接复制会有问题,需要手动修改路径,而且并不保证配置正确。应该首先进入原环境,然后: pip freeze > requirement.txt 这样会在当前目录下创建一个名为requirement.txt的文本文件,把它放到目标机器上(目标机器必须装有Virtualenv)执行: pip install -r requirements.txt ...