`
文章列表
1. Spring Bean实例化 1. 通过BeanName获取Class对象(resolveBeanClass(mbd, beanName);) 2. 处理lookup标签(mbdToUse.prepareMethodOverrides();)// Prepare method overrides. 3. 短路Bean的创建过程 Object bean = resolveBeforeInstantiation(beanName, mbdToUse); // Give BeanPostProcessors a chance to return a proxy instead o ...

Dubbo oninvoke报错

<!-- 方法存在缺陷:如果存在多个onreturn、onthrow的话,方法名不能相同,如果相同就会出现回调覆盖现象 -->     <dubbo:reference id="userService" group="db" interface="com.patty.dubbo.api.service.UserService"                      timeout="500" retries="0" mock="true" check=&q ...
Dubbo StaticContext.getSystemContext(); //attributes通过系统context进行存储. StaticContext.getSystemContext().putAll(attributes); com.alibaba.dubbo.config.ReferenceConfig#init 解析方法上的属性(回调方法) appendAttributes(attributes, method, prifix + "." + method.getName()); checkAndConvertImplicitConfig(method, ...
转载 :mysql- insert select带来的锁问题 https://blog.csdn.net/jolly10/article/details/80095443 转载:MySQL insert into select锁表的问题 https://blog.csdn.net/llliarby/article/details/78697327 参考上边两个帖子,感觉很有帮助,谢谢作者。 insert to select 在oracle正常;迁移到MySQL中,需要在MySQL数据库中对select中where的条件加上索引,避免行锁升级为表锁,否则在并发稍高的情况下可能报死锁错误。 (In ...

Spring aop

    博客分类:
  • JAVA
org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory#getAdvice org.springframework.aop.framework.adapter.DefaultAdvisorAdapterRegistry#wrap ### org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor public class AspectJMethodBeforeAdvice extends AbstractAspect ...
public interface Person {     public void say(); } public class Teacher implements Person {     @Override public void say() {         System.out.println(&quot;我是一名教师!&quot;);     } } public class Student implements Person {     @Override public void say() {         System.out.println(& ...

Java面试转载

转载的面试   https://www.jianshu.com/p/f29f52726c87   https://juejin.im/post/5a339d936fb9a04501680492   http://wiki.jikexueyuan.com/project/java-interview-bible/basic-concept.html   https://yq.aliyun.com/articles/136199   http://www.cnblogs.com/chenssy/p/4922430.html   https://blog.csdn.net/a ...
Java并发编程P61 public class ListHelper<E> { public List<E> list = Collections.synchronizedList(new ArrayList<E>()); /** * 非线程安全,每个实例对象都有唯一的锁来保证对象的原子一致性。 * synchronized修饰在方法上保证ListHelper对象实例的原子性,list实例的原子性得不到保证。 * @param x * @return */ public synchroni ...
java并发编程实战P58 私有构造函数捕获:私有构造函数进行线程安全地对象复制 转发:http://atbug.com/private-constructor-capture-idiom/ /** * 将拷贝构造函数实现为this(p.x, p.y),那么会产生竞态条件,而私有构造函数则可以避免这种竞态条件。这是私有构造函数捕获模式的一个实例 */ public class SafePoint { private int x, y; // 私有内部构造函数 private SafePoint(int[] a) { this(a ...
java.util.concurrent.ForkJoinPool /** * Class for artificial tasks that are used to replace the target * of local joins if they are removed from an interior queue slot * in WorkQueue.tryRemoveAndExec. We don't need the proxy to * actually do anything beyond having a unique identity. */ s ...

cronolog-catalina.out

  if [ "$1" = "-security" ] ; then    if [ $have_tty -eq 1 ]; then      echo "Using Security Manager"    fi    shift    eval "\"$_RUNJAVA\"" "\"$LOGGING_CONFIG\"" $LOGGING_MANAGER $JAVA_OPTS $CATALINA_OPTS \      -Djava.endorsed.d ...
<!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> <script type="text/javascript" src="../jQuery/jquery-1.9.1.js"></script> <script type="text/javascript& ...
修改server.xml中Shutdown port,Connector port,ajp port和Redirect port的端口 从8080端口改变端口 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> 将端口80的TC ...
在单机单用户基础上,如何运行多个tomcat实例。 将网站文件与tomcat发行版本文件分开。一般在使用tomcat时,服务器会从conf及webapps目录中读取配置文件,并将文件写入logs、temp、work目录,当然,一些jar文件盒class文件需要从服务器公共目录树中予以加载。为了让多个实例都能运行,每个tomcat实例必须都有自己的目录集,且他们不能共享两个不同的已配置的Tomcat JVM实例 [root@wls-132 opt]# mkdir tomcat-instace [root@wls-132 tomcat-instace]# mkdir test01 [root ...
以下是一个非常简单的tomcat脚本 # chkconfig: 2345 96 70 # description: Starts and Stops Tomcat. JAVA_HOME=/root/jdk1.6.0_26 CATALINA_HOME=/home/apache-tomcat-6.0.41 export JAVA_HOME CATALINA_HOME exec $CATALINA_HOME/bin/catalina.sh $* 将tomcat文件移动到/etc/init.d/文件目录下 chown root.root tomcat chmod ...
Global site tag (gtag.js) - Google Analytics