Skip to content

Instantly share code, notes, and snippets.

View dearshor's full-sized avatar

Dearshor Xue dearshor

View GitHub Profile
/*
* Copyright 2012-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html -->
<configuration scan="true" scanPeriod="10 seconds" debug="true">
<!-- Simple file output -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- encoder defaults to ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{120} - %msg%n%caller{2}%n</pattern>
</encoder>
@dearshor
dearshor / PasswordEncriyptTest.java
Created October 8, 2013 07:29
shiro-bcrypt-demo
package com.quanhouse.common.service.account;
import org.apache.shiro.authc.credential.PasswordService;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.mindrot.jbcrypt.BCrypt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@dearshor
dearshor / readme.md
Last active December 18, 2015 09:49
A repo to play with Git. You can practice git operation here.

A repo to play with Git. You can practice git operation here.

<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>process-classes</phase>
<configuration>
<target>
<taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask"
classpathref="maven.plugin.classpath" />
@dearshor
dearshor / .gitignore
Created November 21, 2012 05:41
deardemo-webapp
target
@dearshor
dearshor / spring-data-jpa-mvc-demo-pom.xml
Created November 11, 2012 12:50
snippets-for-building-spring-app-with-maven
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework.data.jpa.examples</groupId>
<artifactId>spring-data-jpa-examples</artifactId>
<version>1.0.SNAPSHOT</version>
<packaging>war</packaging>
<name>Spring Data JPA sample projects</name>
netstat -tn 2>/dev/null | grep :80 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
<!-- Embedded ActiveMQ Broker -->
<amq:broker id="broker" useJmx="false" persistent="false">
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:0" />
</amq:transportConnectors>
</amq:broker>
<!-- ActiveMQ Destination -->
<amq:queue id="destination" physicalName="192.168.100.196" />
@dearshor
dearshor / jsigner-issue
Created November 13, 2011 02:02
about-Uml_class_diagram-ReverseEngineering-and-Involved_Maven_plugin
我最近找到一个有趣的maven plugin,可以从已有的java class逆向工程生成UML类图,有关这个插件的信息如下:
jsigner
Jsigner - Automated and Configurable Reverse engineering
http://code.google.com/p/jsigner/
usersGuide
http://code.google.com/p/jsigner/wiki/usersGuide
我尝试了一下,但没有如预期的那样生成我想要的类图,查看日志也没有报错信息,只找到2行DEBUG信息,如下:
23:47:12.270 [MycontainerRunner] DEBUG org.modsl.core.render.HeadlessCanvas - sun.font.FontDesignMetrics[font=java.awt.Font[family=Arial,name=Arial,style=plain,size=9]ascent=9, descent=2, height=12]