dzl před 2 roky
rodič
revize
19568f1d49

+ 11 - 3
common/src/main/java/com/behosoft/framework/component/cachedservice/AbstractCachedService.java

@@ -16,6 +16,7 @@ import com.behosoft.framework.web.dataconvert.ViewDataConvertor;
 import com.behosoft.framework.web.model.RecordVO;
 import com.behosoft.util.BeanUtils;
 import com.behosoft.util.StringUtils;
+import com.behosoft.util.json.JSONUtils;
 import com.mongodb.*;
 import com.wondersgroup.framework.core.bo.Page;
 import com.wondersgroup.framework.util.CollectionUtils;
@@ -169,12 +170,19 @@ public abstract class AbstractCachedService<T extends RecordVO> implements InitB
             int i = 0;
             for (T vo : list)
             {
-                this.getDBCollection().insert(this.createDBObject(vo));
-                System.out.println("【" + this.getCachedTable() + "】 size =" + list.size() + " i=" + (i++));
+                try
+                {
+                    this.getDBCollection().insert(this.createDBObject(vo));
+                }
+                catch (Exception e)
+                {
+                    log.error("缓存加载失败:" + JSONUtils.toJSONString(vo),e);
+                }
+
             }
         }
         long e = System.currentTimeMillis();
-        log.info("load缓存【" + this.getCachedTable() + "】 耗时:" + (e - s) + " ms");
+        log.info("load缓存【" + this.getCachedTable() + "】" + list.size() + "条 耗时:" + (e - s) + " ms");
     }
 
     public void addIndex(DBObject keys)

+ 3 - 1
common/src/main/java/com/behosoft/lis/common/subscriber/CarrierTrackingStatusNewSubscriber.java

@@ -17,6 +17,8 @@ import java.io.Serializable;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
+
+import com.behosoft.util.json.JSONUtils;
 import net.sf.json.JSONArray;
 import net.sf.json.JSONObject;
 import org.apache.commons.beanutils.BeanUtils;
@@ -130,7 +132,7 @@ public class CarrierTrackingStatusNewSubscriber extends AbstractDataSubscriber<W
 		List<DeliverDocument> list = this.deliverDocumentService.findDeliverDocumentList(previousMonthDate, nowMonthDate);
 		
 		if (null != list){
-			logger.info("DeliverDocumentList:" + list.toString());
+			logger.info("DeliverDocumentList:" + JSONUtils.toJSONString(list));
 			
 			for (DeliverDocument deliverDocument : list){
 				String url = "http://" + host + path + deliverDocument.getCarrierTrackingNumber();

+ 2 - 2
common/src/main/java/com/behosoft/util/BusinessUtils.java

@@ -312,7 +312,7 @@ public class BusinessUtils extends CommonUtils {
 			try {
 				Property property = hibernateMetaSupport.getPropertyByColumnName(boClass, fieldName, false);
 				if (property == null) {
-					LOGGER.info("No Such Field: " + fieldName + " For " + pojo.getName());
+//					LOGGER.info("No Such Field: " + fieldName + " For " + pojo.getName());
 					continue;
 				}
 				fieldName = property.getName();
@@ -322,7 +322,7 @@ public class BusinessUtils extends CommonUtils {
 					value = rs.getBoolean(i);
 				}
 				if( fieldName.equalsIgnoreCase("deleteFlag")){
-					System.out.println(property.getType().getReturnedClass());
+//					System.out.println(property.getType().getReturnedClass());
 				}
 				if (value != null && value instanceof BigDecimal) {
 					if( property.getType().getReturnedClass()==Integer.class ){

+ 1 - 1
common/src/main/resources/config/framework/database.properties

@@ -37,7 +37,7 @@ hibernate.jdbc.batch_size 10
 #hibernate.connection.password xmadage
 
 jdbc.driver=com.mysql.jdbc.Driver
-jdbc.url=jdbc:mysql://localhost:3306/syd?characterEncoding=utf8
+jdbc.url=jdbc:mysql://192.168.200.90:3306/syd?characterEncoding=utf8&useUnicode=true
 jdbc.username=root
 jdbc.password=root
 hibernate.dialect=org.hibernate.dialect.MySQLDialect

+ 378 - 0
common/src/main/resources/ehcache.xml

@@ -0,0 +1,378 @@
+<ehcache>
+
+    <!--
+    Sets the path to the directory where cache files are created.
+
+    If the path is a Java System Property it is replaced by its value in the
+    running VM.
+
+    The following properties are translated:
+    * user.home - User's home directory
+    * user.dir - User's current working directory
+    * java.io.tmpdir - Default temp file path
+
+    Subdirectories can be specified below the property e.g. java.io.tmpdir/one
+    -->
+    <diskStore path="java.io.tmpdir"/>
+
+    <!--
+    Specifies a CacheManagerEventListenerFactory, be used to create a CacheManagerPeerProvider,
+    which is notified when Caches are added or removed from the CacheManager.
+
+    The attributes of CacheManagerEventListenerFactory are:
+    * class - a fully qualified factory class name
+    * properties - comma separated properties having meaning only to the factory.
+
+    Sets the fully qualified class name to be registered as the CacheManager event listener.
+
+    The events include:
+    * adding a Cache
+    * removing a Cache
+
+    Callbacks to listener methods are synchronous and unsynchronized. It is the responsibility
+    of the implementer to safely handle the potential performance and thread safety issues
+    depending on what their listener is doing.
+
+    If no class is specified, no listener is created. There is no default.
+    -->
+    <cacheManagerEventListenerFactory class="" properties=""/>
+
+
+    <!--
+    (Enable for distributed operation)
+
+    Specifies a CacheManagerPeerProviderFactory which will be used to create a
+    CacheManagerPeerProvider, which discovers other CacheManagers in the cluster.
+
+    The attributes of cacheManagerPeerProviderFactory are:
+    * class - a fully qualified factory class name
+    * properties - comma separated properties having meaning only to the factory.
+
+    Ehcache comes with a built-in RMI-based distribution system with two means of discovery of
+    CacheManager peers participating in the cluster:
+    * automatic, using a multicast group. This one automatically discovers peers and detects
+      changes such as peers entering and leaving the group
+    * manual, using manual rmiURL configuration. A hardcoded list of peers is provided at
+      configuration time.
+
+    Configuring Automatic Discovery:
+    Automatic discovery is configured as per the following example:
+    <cacheManagerPeerProviderFactory
+                        class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
+                        properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
+                                    multicastGroupPort=4446"/>
+
+    Valid properties are:
+    * peerDiscovery (mandatory) - specify "automatic"
+    * multicastGroupAddress (mandatory) - specify a valid multicast group address
+    * multicastGroupPort (mandatory) - specify a dedicated port for the multicast heartbeat
+      traffic
+
+    Configuring Manual Discovery:
+    Manual discovery is configured as per the following example:
+    <cacheManagerPeerProviderFactory class=
+                          "net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
+                          properties="peerDiscovery=manual,
+                          rmiUrls=//server1:40000/sampleCache1|//server2:40000/sampleCache1
+                          | //server1:40000/sampleCache2|//server2:40000/sampleCache2"/>
+
+    Valid properties are:
+    * peerDiscovery (mandatory) - specify "manual"
+    * rmiUrls (mandatory) - specify a pipe separated list of rmiUrls, in the form
+                            //hostname:port
+
+    The hostname is the hostname of the remote CacheManager peer. The port is the listening
+    port of the RMICacheManagerPeerListener of the remote CacheManager peer.
+
+    An alternate CacheManagerPeerProviderFactory can be used for JNDI discovery of other
+    CacheManagers in the cluster. Only manual discovery is supported.
+
+    For cacheManagerPeerProviderFactory specify class
+    net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
+
+    Correspondingly for cacheManagerPeerListenerFactory specify class
+    net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactoryory.
+
+    Configuring JNDI Manual Discovery:
+    Manual JNDI discovery is configured as per the following example:
+    <cacheManagerPeerProviderFactory class=
+        "net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory"
+        properties="peerDiscovery=manual, stashContexts=true, stashRemoteCachePeers=true,
+              jndiUrls=t3//server1:40000/sampleCache1|t3//server2:40000/sampleCache1
+              |t3//server1:40000/sampleCache2|t3//server2:40000/sampleCache2"/>
+
+    Valid properties are:
+    * peerDiscovery (mandatory) - specify "manual"
+    * stashContexts (optional) - specify "true" or "false".  Defaults to true.
+      java.naming.Context objects are stashed for performance.
+    * stashRemoteCachePeers (optional) - specify "true" or "false".  Defaults to true.
+      CachePeer objects are stashed for performance.
+    * jndiUrls (mandatory) - specify a pipe separated list of jndiUrls,
+      in the form protocol//hostname:port
+    -->
+  <!--    by jeking
+    <cacheManagerPeerProviderFactory
+            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
+            properties="peerDiscovery=automatic,
+                        multicastGroupAddress=230.0.0.1,
+                        multicastGroupPort=4446"/>
+
+ -->
+    <!--
+    (Enable for distributed operation)
+
+    Specifies a CacheManagerPeerListenerFactory which will be used to create a
+    CacheManagerPeerListener, which
+    listens for messages from cache replicators participating in the cluster.
+
+    The attributes of cacheManagerPeerListenerFactory are:
+    class - a fully qualified factory class name
+    properties - comma separated properties having meaning only to the factory.
+
+    Ehcache comes with a built-in RMI-based distribution system. The listener component is
+    RMICacheManagerPeerListener which is configured using
+    RMICacheManagerPeerListenerFactory. It is configured as per the following example:
+
+    <cacheManagerPeerListenerFactory
+        class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"
+        properties="hostName=fully_qualified_hostname_or_ip,
+                    port=40001,
+                    socketTimeoutMillis=120000"/>
+
+    All properties are optional. They are:
+    * hostName - the hostName of the host the listener is running on. Specify
+      where the host is multihomed and you want to control the interface over which cluster
+      messages are received. Defaults to the host name of the default interface if not
+      specified.
+    * port - the port the listener listens on. This defaults to a free port if not specified.
+    * socketTimeoutMillis - the number of ms client sockets will stay open when sending
+      messages to the listener. This should be long enough for the slowest message.
+      If not specified it defaults 120000ms.
+
+
+    An alternate CacheManagerPeerListenerFactory can be also be used for JNDI binding of
+    listeners for messages from cache replicators participating in the cluster. For
+    cacheManagerPeerListenerFactory specify
+    class net.sf.ehcache.distribution.JNDIRMICacheManagerPeerListenerFactory.
+    Correspondingly for cacheManagerPeerProviderFactory specify class
+    net.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProviderFactoryerFactory.
+    Properties for JNDIRMICacheManagerPeerListenerFactory are the same as
+    RMICacheManagerPeerListenerFactory.
+
+    -->
+    <cacheManagerPeerListenerFactory
+            class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory"/>
+
+    <!-- Cache configuration.
+
+    The following attributes are required.
+
+    name:
+    Sets the name of the cache. This is used to identify the cache. It must be unique.
+
+    maxElementsInMemory:
+    Sets the maximum number of objects that will be created in memory
+
+    eternal:
+    Sets whether elements are eternal. If eternal,  timeouts are ignored and the
+    element is never expired.
+
+    overflowToDisk:
+    Sets whether elements can overflow to disk when the in-memory cache
+    has reached the maxInMemory limit.
+
+    The following attributes are optional.
+
+    timeToIdleSeconds:
+    Sets the time to idle for an element before it expires.
+    i.e. The maximum amount of time between accesses before an element expires
+    Is only used if the element is not eternal.
+    Optional attribute. A value of 0 means that an Element can idle for infinity.
+    The default value is 0.
+
+    timeToLiveSeconds:
+    Sets the time to live for an element before it expires.
+    i.e. The maximum time between creation time and when an element expires.
+    Is only used if the element is not eternal.
+    Optional attribute. A value of 0 means that and Element can live for infinity.
+    The default value is 0.
+
+    diskPersistent:
+    Whether the disk store persists between restarts of the Virtual Machine.
+    The default value is false.
+
+    diskExpiryThreadIntervalSeconds:
+    The number of seconds between runs of the disk expiry thread. The default value
+    is 120 seconds.
+
+    memoryStoreEvictionPolicy:
+    Policy would be enforced upon reaching the maxElementsInMemory limit. Default
+    policy is Least Recently Used (specified as LRU). Other policies available -
+    First In First Out (specified as FIFO) and Less Frequently Used
+    (specified as LFU)
+
+    Cache elements can also contain sub elements which take the same format of a factory class
+    and properties. Defined sub-elements are:
+
+    * cacheEventListenerFactory - Enables registration of listeners for cache events, such as
+      put, remove, update, and expire.
+
+    * bootstrapCacheLoaderFactory - Specifies a BootstrapCacheLoader, which is called by a
+      cache on initialisation to prepopulate itself.
+
+    Each cache that will be distributed needs to set a cache event listener which replicates
+    messages to the other CacheManager peers. For the built-in RMI implementation this is done
+    by adding a cacheEventListenerFactory element of type RMICacheReplicatorFactory to each
+    distributed cache's configuration as per the following example:
+
+    <cacheEventListenerFactory class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
+         properties="replicateAsynchronously=true,
+         replicatePuts=true,
+         replicateUpdates=true,
+         replicateUpdatesViaCopy=true,
+         replicateRemovals=true "/>
+
+    The RMICacheReplicatorFactory recognises the following properties:
+
+    * replicatePuts=true|false - whether new elements placed in a cache are
+      replicated to others. Defaults to true.
+
+    * replicateUpdates=true|false - whether new elements which override an
+      element already existing with the same key are replicated. Defaults to true.
+
+    * replicateRemovals=true - whether element removals are replicated. Defaults to true.
+
+    * replicateAsynchronously=true | false - whether replications are
+      asynchronous (true) or synchronous (false). Defaults to true.
+
+    * replicateUpdatesViaCopy=true | false - whether the new elements are
+      copied to other caches (true), or whether a remove message is sent. Defaults to true.
+
+
+    The RMIBootstrapCacheLoader bootstraps caches in clusters where RMICacheReplicators are
+    used. It is configured as per the following example:
+
+    <bootstrapCacheLoaderFactory
+        class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"
+        properties="bootstrapAsynchronously=true, maximumChunkSizeBytes=5000000"/>
+
+    The RMIBootstrapCacheLoaderFactory recognises the following optional properties:
+
+    * bootstrapAsynchronously=true|false - whether the bootstrap happens in the background
+      after the cache has started. If false, bootstrapping must complete before the cache is
+      made available. The default value is true.
+
+    * maximumChunkSizeBytes=<integer> - Caches can potentially be very large, larger than the
+      memory limits of the VM. This property allows the bootstraper to fetched elements in
+      chunks. The default chunk size is 5000000 (5MB).
+
+    -->
+
+
+    <!--
+    Mandatory Default Cache configuration. These settings will be applied to caches
+    created programmtically using CacheManager.add(String cacheName)
+    -->
+    <defaultCache
+            maxElementsInMemory="10000"
+            eternal="false"
+            timeToIdleSeconds="120"
+            timeToLiveSeconds="120"
+            overflowToDisk="true"
+            diskPersistent="false"
+            diskExpiryThreadIntervalSeconds="120"
+            memoryStoreEvictionPolicy="LRU"
+            />
+
+    <!--
+    Sample caches. Following are some example caches. Remove these before use.
+    -->
+
+    <!--
+    Sample cache named sampleCache1
+    This cache contains a maximum in memory of 10000 elements, and will expire
+    an element if it is idle for more than 5 minutes and lives for more than
+    10 minutes.
+
+    If there are more than 10000 elements it will overflow to the
+    disk cache, which in this configuration will go to wherever java.io.tmp is
+    defined on your system. On a standard Linux system this will be /tmp"
+    -->
+    <cache name="defaultCacheDefine"
+           maxElementsInMemory="10000"
+           eternal="false"
+           overflowToDisk="true"
+           timeToIdleSeconds="300"
+           timeToLiveSeconds="600"
+           memoryStoreEvictionPolicy="LFU"
+            />
+
+
+    <!--
+    Sample cache named sampleCache2
+    This cache has a maximum of 1000 elements in memory. There is no overflow to disk, so 1000
+    is also the maximum cache size. Note that when a cache is eternal, timeToLive and
+    timeToIdle are not used and do not need to be specified.
+    -->
+    <cache name="sampleCache2"
+           maxElementsInMemory="1000"
+           eternal="true"
+           overflowToDisk="false"
+           memoryStoreEvictionPolicy="FIFO"
+            />
+
+
+    <!--
+    Sample cache named sampleCache3. This cache overflows to disk. The disk store is
+    persistent between cache and VM restarts. The disk expiry thread interval is set to 10
+    minutes, overriding the default of 2 minutes.
+    -->
+    <cache name="sampleCache3"
+           maxElementsInMemory="500"
+           eternal="false"
+           overflowToDisk="true"
+           timeToIdleSeconds="300"
+           timeToLiveSeconds="600"
+           diskPersistent="true"
+           diskExpiryThreadIntervalSeconds="1"
+           memoryStoreEvictionPolicy="LFU"
+            />
+
+
+    <!--
+    Sample distributed cache named sampleDistributedCache1.
+    This cache replicates using defaults.
+    It also bootstraps from the cluster, using default properties.
+    -->
+    <!--<cache name="sampleDistributedCache1"
+           maxElementsInMemory="10"
+           eternal="false"
+           timeToIdleSeconds="100"
+           timeToLiveSeconds="100"
+           overflowToDisk="false">
+        <bootstrapCacheLoaderFactory
+                class="net.sf.ehcache.distribution.RMIBootstrapCacheLoaderFactory"/>
+        <cacheEventListenerFactory
+                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"/>
+    </cache>-->
+
+
+    <!--
+    Sample distributed cache named sampleDistributedCache2.
+    This cache replicates using specific properties.
+    It only replicates updates and does so synchronously via copy
+    -->
+    <!--<cache name="sampleDistributedCache2"
+           maxElementsInMemory="10"
+           eternal="false"
+           timeToIdleSeconds="100"
+           timeToLiveSeconds="100"
+           overflowToDisk="false">
+        <cacheEventListenerFactory
+                class="net.sf.ehcache.distribution.RMICacheReplicatorFactory"
+                properties="replicateAsynchronously=false, replicatePuts=false,
+                            replicateUpdates=true, replicateUpdatesViaCopy=true,
+                            replicateRemovals=false"/>
+    </cache>-->
+
+</ehcache>

+ 110 - 0
common/src/main/resources/oscache.properties

@@ -0,0 +1,110 @@
+# CACHE IN MEMORY
+#
+# If you want to disable memory caching, just uncomment this line.
+#
+# cache.memory=false
+
+
+# CACHE KEY
+#
+# This is the key that will be used to store the cache in the application
+# and session scope.
+#
+# If you want to set the cache key to anything other than the default
+# uncomment this line and change the cache.key
+#
+# cache.key=__oscache_cache
+
+
+# USE HOST DOMAIN NAME IN KEY
+#
+# Servers for multiple host domains may wish to add host name info to
+# the generation of the key.  If this is true, then uncomment the
+# following line.
+#
+# cache.use.host.domain.in.key=true
+
+
+# CACHE LISTENERS
+#
+# These hook OSCache events and perform various actions such as logging
+# cache hits and misses, or broadcasting to other cache instances across a cluster.
+# See the documentation for further information.
+#
+# cache.event.listeners=com.opensymphony.oscache.plugins.clustersupport.JMSBroadcastingListener,  \
+#                       com.opensymphony.oscache.extra.CacheEntryEventListenerImpl,               \
+#                       com.opensymphony.oscache.extra.CacheMapAccessEventListenerImpl,           \
+#                       com.opensymphony.oscache.extra.ScopeEventListenerImpl
+
+
+# CACHE PERSISTENCE CLASS
+#
+# Specify the class to use for persistence. If you use the supplied DiskPersistenceListener,
+# don't forget to supply the cache.path property to specify the location of the cache
+# directory.
+# 
+# If a persistence class is not specified, OSCache will use memory caching only.
+#
+# cache.persistence.class=com.opensymphony.oscache.plugins.diskpersistence.DiskPersistenceListener
+
+
+# CACHE DIRECTORY
+#
+# This is the directory on disk where caches will be stored by the DiskPersistenceListener.
+# it will be created if it doesn't already exist. Remember that OSCache must have
+# write permission to this directory.
+#
+# Note: for Windows machines, this needs \ to be escaped
+# ie Windows:
+# cache.path=c:\\myapp\\cache
+# or *ix:
+# cache.path=/opt/myapp/cache
+#
+# cache.path=c:\\app\\cache
+
+
+# CACHE ALGORITHM
+#
+# Default cache algorithm to use. Note that in order to use an algorithm
+# the cache size must also be specified. If the cache size is not specified,
+# the cache algorithm will be Unlimited cache.
+#
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.LRUCache
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.FIFOCache
+# cache.algorithm=com.opensymphony.oscache.base.algorithm.UnlimitedCache
+
+
+# CACHE SIZE
+#
+# Default cache size in number of items. If a size is specified but not
+# an algorithm, the cache algorithm used will be LRUCache.
+#
+cache.capacity=1000
+
+
+# CACHE UNLIMITED DISK
+# Use unlimited disk cache or not. The default value is false, which means
+# the disk cache will be limited in size to the value specified by cache.capacity.
+#
+# cache.unlimited.disk=false
+
+
+# JMS CLUSTER PROPERTIES
+#
+# Configuration properties for JMS clustering. See the clustering documentation
+# for more information on these settings.
+#
+#cache.cluster.jms.topic.factory=java:comp/env/jms/TopicConnectionFactory
+#cache.cluster.jms.topic.name=java:comp/env/jms/OSCacheTopic
+#cache.cluster.jms.node.name=node1
+
+
+# JAVAGROUPS CLUSTER PROPERTIES
+#
+# Configuration properites for the JavaGroups clustering. Only one of these
+# should be specified. Default values (as shown below) will be used if niether
+# property is set. See the clustering documentation and the JavaGroups project
+# (www.javagroups.com) for more information on these settings.
+#
+#cache.cluster.properties=UDP(mcast_addr=231.12.21.132;mcast_port=45566;ip_ttl=32;mcast_send_buf_size=150000;mcast_recv_buf_size=80000):PING(timeout=2000;num_initial_members=3):MERGE2(min_interval=5000;max_interval=10000):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(desired_avg_gossip=20000):UNICAST(timeout=5000):FRAG(frag_size=8096;down_thread=false;up_thread=false):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=false;print_local_addr=true)
+#cache.cluster.multicast.ip=231.12.21.132

+ 5 - 3
web-clis/src/main/resources/config/lis/log4j.properties

@@ -3,6 +3,7 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.stdout.encoding=UTF-8
 
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.File=C:/Log/lis.log
@@ -11,7 +12,7 @@ log4j.appender.file.MaxFileSize=10240KB
 log4j.appender.file.MaxBackupIndex=10 
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
+log4j.appender.file.encoding=UTF-8
 
 log4j.appender.wavefile=org.apache.log4j.RollingFileAppender
 log4j.appender.wavefile.File=C:/Log/waveLog/wavelog.log
@@ -20,7 +21,7 @@ log4j.appender.wavefile.MaxFileSize=10240KB
 log4j.appender.wavefile.MaxBackupIndex=10 
 log4j.appender.wavefile.layout=org.apache.log4j.PatternLayout
 log4j.appender.wavefile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
+log4j.appender.wavefile.encoding=UTF-8
 
 log4j.appender.operatorFile=org.apache.log4j.RollingFileAppender
 log4j.appender.operatorFile.File=C:/Log/operator/operator.log
@@ -29,7 +30,7 @@ log4j.appender.operatorFile.MaxFileSize=10240KB
 log4j.appender.operatorFile.MaxBackupIndex=100
 log4j.appender.operatorFile.layout=org.apache.log4j.PatternLayout
 log4j.appender.operatorFile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
+log4j.appender.operatorFile.encoding=UTF-8
 
 log4j.appender.afile=org.apache.log4j.RollingFileAppender
 log4j.appender.afile.File=C:/Log/waveLog/aFile.log
@@ -38,6 +39,7 @@ log4j.appender.afile.MaxFileSize=10240KB
 log4j.appender.afile.MaxBackupIndex=10 
 log4j.appender.afile.layout=org.apache.log4j.PatternLayout
 log4j.appender.afile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.afile.encoding=UTF-8
 
 log4j.rootLogger=info, stdout,file
 

+ 4 - 3
web-cluster/src/main/resources/config/cluster/log4j.properties

@@ -3,6 +3,7 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.stdout.encoding=UTF-8
 
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.File=C:/Log/cluster.log
@@ -11,8 +12,8 @@ log4j.appender.file.MaxFileSize=10240KB
 log4j.appender.file.MaxBackupIndex=10 
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.file.encoding=UTF-8
 
-log4j.rootLogger=info, stdout,file
-
-
+log4j.rootLogger=info,stdout,file
+log4j.logger.org.hibernate.cfg=ERROR,file,stdout
 

+ 3 - 0
web-edi/src/main/resources/config/edi/log4j.properties

@@ -3,6 +3,7 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.Target=System.out
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.stdout.encoding=UTF-8
 
 log4j.appender.file=org.apache.log4j.RollingFileAppender
 log4j.appender.file.File=C:/Log/edi.log
@@ -11,6 +12,7 @@ log4j.appender.file.MaxFileSize=10240KB
 log4j.appender.file.MaxBackupIndex=10 
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.file.encoding=UTF-8
 
 log4j.appender.plfile=org.apache.log4j.RollingFileAppender
 log4j.appender.plfile.File=C:/Log/picklist/pl.log
@@ -19,6 +21,7 @@ log4j.appender.plfile.MaxFileSize=10240KB
 log4j.appender.plfile.MaxBackupIndex=10 
 log4j.appender.plfile.layout=org.apache.log4j.PatternLayout
 log4j.appender.plfile.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+log4j.appender.plfile.encoding=UTF-8
 
 log4j.rootLogger=info, stdout,file