This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mypackage; | |
import java.lang.reflect.Method; | |
import java.util.Enumeration; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpSession; | |
public class ToStringUtil { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | |
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> | |
<appender name="stdout" class="org.apache.log4j.ConsoleAppender"> | |
<layout class="org.apache.log4j.PatternLayout"> | |
<!-- Pattern to output the caller's file name and line number --> | |
<param name="ConversionPattern" value="%d{ISO8601} [%p] %m [(%M)%c]%n" /> | |
</layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Cluster channelSendOptions="8" className="org.apache.catalina.ha.tcp.SimpleTcpCluster"> | |
<Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" domainReplication="true" notifyListenersOnReplication="true" /> | |
<Channel className="org.apache.catalina.tribes.group.GroupChannel"> | |
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> | |
<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" /> | |
</Sender> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" | |
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd | |
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd | |
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd | |
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<Context> | |
<!-- maxActive: Maximum number of dB connections in pool. Make sure you | |
configure your mysqld max_connections large enough to handle | |
all of your db connections. Set to -1 for no limit. | |
--> | |
<!-- maxIdle: Maximum number of idle dB connections to retain in pool. | |
Set to -1 for no limit. See also the DBCP documentation on this |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bmchild.security.access.expression; | |
import org.aopalliance.intercept.MethodInvocation; | |
import org.apache.log4j.Logger; | |
import org.springframework.security.access.expression.SecurityExpressionRoot; | |
import org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler; | |
import org.springframework.security.core.Authentication; | |
/** | |
* @author bchild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bmchild.repository; | |
/*imports | |
*. | |
*. | |
*. | |
*/ | |
@RunWith(SpringJUnit4ClassRunner.class) | |
@ContextConfiguration(loader=AnnotationConfigContextLoader.class) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
com.bmchild; | |
//imports | |
public class CallingMyCollectionsUtil { | |
private class Pojo { | |
private String field; | |
public String getField() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SuppressWarnings("rawtypes") | |
public static Class<?> getEntity(JpaRepository repo) { | |
Type clazzes = getGenericType(repo.getClass())[0]; | |
Type[] jpaClass = getGenericType(getClass(clazzes)); | |
return getClass( ((ParameterizedType)jpaClass[0]).getActualTypeArguments()[0]); | |
} | |
public static Type[] getGenericType(Class<?> target) { | |
if (target == null) | |
return new Type[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> | |
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_BUILDER_ENABLED" value="false"/> | |
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_DISABLED_BUILDER" value="org.springframework.ide.eclipse.core.springbuilder"/> | |
<mapAttribute key="org.eclipse.ui.externaltools.ATTR_TOOL_ARGUMENTS"/> | |
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> | |
</launchConfiguration> |
OlderNewer