Giter VIP home page Giter VIP logo

paoding-rose's Introduction

paoding-rose

Introduction

Paoding-rose is an open source framework, which introduces the best way to develop your web applications and RDMS applications.

Paoding-rose has been a main development framework of renren.com (人人网), mi.com (小米科技), mocha.cn (抹茶美妆).

And we also receive reports that paoding-rose has been chosen in some applicaitons for qunar.com (去哪儿), focus.cn (焦点房产).

(如果您的公司也使用paoding-rose, 欢迎联系qieqie.wang at gmail.com)

Enable paoding-rose in your java project

**Add dependencies to pom.xml in your maven project . **

The artifacts have been released to oss.sonatype.org and synced to maven central repository

<dependency>
    <groupId>net.paoding</groupId>
    <artifactId>paoding-rose-jade</artifactId>
    <version>2.0.u01</version>
</dependency>
<dependency>
    <groupId>net.paoding</groupId>
    <artifactId>paoding-rose-web</artifactId>
    <version>2.0.u01</version>
</dependency>

TIPs: 2.0.uxx means the xxth update of 2.0.

Enable SNAPSHOT dependency

If you always want your project using the lastest version, check <version>2.0.uxx</version>to value 2.0-SNAPSHOT as following:

1) add snapshot repository to your pom.xml:

 // under project element
 <repositories>
        <repository>
            <id>ossrh-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
 </repositories>
  1. checkout the the SNAPSHOT version:
<dependency>
    <groupId>net.paoding</groupId>
    <artifactId>paoding-rose-jade</artifactId>
    <version>2.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>net.paoding</groupId>
    <artifactId>paoding-rose-web</artifactId>
    <version>2.0-SNAPSHOT</version>
</dependency>

paoding-rose's People

Contributors

qieqie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paoding-rose's Issues

JADE报个bug:批量插入时,若批量list的size为1,会报错

RT,
尝试bugfix如下,不知道是否合理
修改execute方法:

@OverRide
public Object execute(SQLType sqlType, StatementRuntime... runtimes) {
switch (runtimes.length) {
case 0:
return 0;
case 1:
/**
* runtime长度为1,也可能调用的是batchUpdate,
* 根据jdbcTemplate接口定义,是不是可以认为返回值为数组的,即为batchUpdate操作
*/
if(returnType.isArray()){
return executeBatch(runtimes);
}
return executeSingle(runtimes[0], returnType);
default:
return executeBatch(runtimes);
}
}

在用paoding-rose时,用jetty运行时报错,tomcat下正常

java.lang.NullPointerException
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:210)
at org.mortbay.jetty.servlet.Dispatcher.forward(Dispatcher.java:126)
at net.paoding.rose.web.portal.impl.WindowTask.run(WindowTask.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

用的jetty版本:

org.mortbay.jetty
maven-jetty-plugin
6.1.26

paoding的版本, 大概就这一个版本吧?

paoding-rose paoding-rose 1.0.1

改为jetty 7

org.mortbay.jetty jetty-maven-plugin 7.6.5.v20120716

报这样的错:

java.lang.NullPointerException
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:214)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:115)
at net.paoding.rose.web.portal.impl.WindowTask.run(WindowTask.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

改为jetty 8.1.5

java.lang.NullPointerException
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:197)
at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:98)
at net.paoding.rose.web.portal.impl.WindowTask.run(WindowTask.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)

restful提交json,requestBody

Restful,返回json可以使用字符串返回,但是提交json,requestBody如何实现,我根据SpringMVC来做接收不到参数

安装rose成功,gradle sample时编译报错

windows8 +java7 clone出paoding-rose,安装gradle后 gradle install 都OK;

但是进入 sample/HelloRose ,然后 gradle jettyRun 的时候报错:

"
D:\devtools\paoding-rose\samples\HelloRose>gradle jettyRun
:compileJava

FAILURE: Build failed with an exception.

  • What went wrong:
    Could not resolve all dependencies for configuration ':compile'.

    Could not find net.paoding:rose:1.2-SNAPSHOT.
    Required by:
    :HelloRose:unspecified
    Could not find net.paoding:rose-jade:1.2-SNAPSHOT.
    Required by:
    :HelloRose:unspecified

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug
    option to get more log output.

BUILD FAILED

"

进入~/.m2/ 确实有找到上面的错误中的jar,难道是环境变量不对?

Rose 迁移 Spring Boot

  • 目前公司老项目是使用的 Rose 项目,新项目都是 Spring Boot,后续计划是往 Spring Boot 走

  • 但是老的 Rose 项目迁移成本很高,如果 Rose 项目和 Spring Boot 能在一个项目**存,这样前移时可以减少一部分的风险

  • 先快速切换到 Spring Boot 启动,并能同时使用 Spring Boot 的特性,具体代码慢慢迁移

  • 不知道目前 Paoding Rose 的使用情况如何,有多少公司在使用,是否有此类需求在里面?

还在更新吗?

老大,rose还在更新吗?还会更新吗?感觉跟终止了一样啊。
mongodb会添加支持吗?

portal在jetty8.1.18中nullpointerexception

jetty 的dispacher中有一行的处理是
Request baseRequest=(request instanceof Request)?((Request)request):AbstractHttpConnection.getCurrentConnection().getRequest();
(Request)是jetty的实现
AbstractHttpConnection.getCurrentConnection()内部实现是threadLocal
如果用portal会报nullpointerexception

如何在rose框架内部对request进行wrapper

由于rose的数据处理是先通过参数解析器,然后是拦截器,因此如果在拦截器部分进行转发,此时数据有可能已经被参数解析器读完了,因此难以对request进行wrapper,目前项目中使用的是servlet的过滤器,也就是在rose外部进行处理的,但这又导致我们难以拿到rose内部方法的注解,因此还是需要配合拦截器。
对比mvc,拦截器是在参数解析器之前,就不存在这个问题。是否考虑增加一个扩展点,让用户可以在框架处理数据前拿到request和response进行预处理?

rose如何在jsp里使用i18n支持?

我按照 四步完成Spring国际化动态配置 上面配好了resolver

并在controller里处理:

    @Get
    public String index(Invocation inv, @Param("language") String language) {
        if (language != null) {
            Locale locale = org.springframework.util.StringUtils.parseLocaleString(language);
            logger.debug("language: {}, locale: {}", language, locale);
            resolver.setLocale(inv.getRequest(), inv.getResponse(), locale);
        }
        return "index";
    }

在jsp里打印:

${pageContext.request.locale}, <spring:message code="web.title"/>

结果 /?language=zh_CN 访问,logger里能打出来是:zh_CN,cookie里也能看到是zh_CN
但是jsp里,仍然是en_US
求教。。。

JADE中##sql拼接问题

现象
当SQL中使用##拼接sql字符串时,如果sql语句中使用了in的sql语法,就会导致解析错误

查看源码
ReplacementIntercepter中的##解析的正则表达式有问题
final Pattern PATTERN = Pattern.compile("\{([a-zA-Z0-9_\.\:]+)\}|##\((.+)\)");
这个正则表达式采用的是贪婪模式
如下sql
update ##(:1) set status=:2 where id in (:3)

源码
while (matcher.find(start)) {
String group = matcher.group();
String key = null;
if (group.startsWith("{")) {
key = matcher.group(1);
} else if (group.startsWith("##(")) {
key = matcher.group(2); //key = :1) set status=:2 where id in (:3
}

rose 不支持jdk1.8

Caused by: java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher
at org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)

pipe测试不成功,会一直卡在那里,浏览器没有响应。已经使用2.0。

2016-09-21 18:45:39 [DEBUG] GET http://localhost:8084/search/3.8
2016-09-21 18:45:39 [DEBUG] ['/3.8'] matched(1): ''
2016-09-21 18:45:39 [DEBUG] ['/3.8'] matched(2): '/3.8'
2016-09-21 18:45:39 [DEBUG] ['/3.8'] matched over.
2016-09-21 18:45:39 [DEBUG] Score of net.paoding.rose.web.impl.thread.LinkedEngine:1
2016-09-21 18:45:39 [DEBUG] Engine selected:com.itcc8.sms.wechat.controllers.WechatController#pipe
2016-09-21 18:45:39 [DEBUG] mapped '/search/3.8' to com.itcc8.sms.wechat.controllers.WechatController#pipe
2016-09-21 18:45:39 [DEBUG] set request.characterEncoding by default:UTF-8
2016-09-21 18:45:39 [DEBUG] add attribute to model: invocation=/search/3.8
2016-09-21 18:45:39 [DEBUG] add attribute to model: ctxpath=/search
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.validation.BindingResult.parameterBindingResult=net.paoding.rose.web.impl.validation.ParameterBindingResult: 0 errors
2016-09-21 18:45:39 [DEBUG] Resolves parameter Pipe using net.paoding.rose.web.paramresolver.ResolverFactoryImpl$IndexAliasResolver
2016-09-21 18:45:39 [DEBUG] setAttribute($$paoding-rose-portal.pipe=pipe ['/search/3.8'])
2016-09-21 18:45:39 [DEBUG] add attribute to model: pipe=pipe ['/search/3.8']
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp1; contentLength=-1; sc=200
2016-09-21 18:45:39 [DEBUG] add attribute to model: p1=
2016-09-21 18:45:39 [DEBUG] onWindowAdded: [p1]@pipe ['/search/3.8']
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp2; contentLength=-1; sc=200
2016-09-21 18:45:39 [DEBUG] add attribute to model: p2=
2016-09-21 18:45:39 [DEBUG] onWindowAdded: [p2]@pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] onWindowStarted: [p1]@pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] onWindowStarted: [p2]@pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] interceptor[rose.mergeWindowAttributesToModel] do round and return 'pipe'
2016-09-21 18:45:39 [DEBUG] pipe ['/search/3.8'] is going to wait pipe windows' ins.
2016-09-21 18:45:39 [DEBUG] waitting for window 'p1''s in; timetou=never
2016-09-21 18:45:39 [DEBUG] GET http://localhost:8084/search/wp1
2016-09-21 18:45:39 [DEBUG] GET http://localhost:8084/search/wp2
2016-09-21 18:45:39 [DEBUG] notify window 'p1'
2016-09-21 18:45:39 [DEBUG] notify window 'p2'
2016-09-21 18:45:39 [DEBUG] ['/wp1'] matched(1): ''
2016-09-21 18:45:39 [DEBUG] ['/wp2'] matched(1): ''
2016-09-21 18:45:39 [DEBUG] ['/wp1'] matched(2): '/wp1'
2016-09-21 18:45:39 [DEBUG] ['/wp2'] matched(2): '/wp2'
2016-09-21 18:45:39 [DEBUG] ['/wp1'] matched over.
2016-09-21 18:45:39 [DEBUG] ['/wp2'] matched over.
2016-09-21 18:45:39 [DEBUG] Score of net.paoding.rose.web.impl.thread.LinkedEngine:1
2016-09-21 18:45:39 [DEBUG] Score of net.paoding.rose.web.impl.thread.LinkedEngine:1
2016-09-21 18:45:39 [DEBUG] Engine selected:com.itcc8.sms.wechat.controllers.WechatController#portal1
2016-09-21 18:45:39 [DEBUG] Engine selected:com.itcc8.sms.wechat.controllers.WechatController#portal2
2016-09-21 18:45:39 [DEBUG] mapped '/search/wp1' to com.itcc8.sms.wechat.controllers.WechatController#portal1
2016-09-21 18:45:39 [DEBUG] mapped '/search/wp2' to com.itcc8.sms.wechat.controllers.WechatController#portal2
2016-09-21 18:45:39 [DEBUG] add attribute to model: ctxpath=/search
2016-09-21 18:45:39 [DEBUG] add attribute to model: ctxpath=/search
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp2; contentLength=-1; sc=200
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp2; contentLength=-1; sc=200
2016-09-21 18:45:39 [DEBUG] add attribute to model: p2=
2016-09-21 18:45:39 [DEBUG] add attribute to model: p2=
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp1; contentLength=-1; sc=200
2016-09-21 18:45:39 [INFO] rendering a unsuccess window: /wp1; contentLength=-1; sc=200
2016-09-21 18:45:39 [DEBUG] add attribute to model: p1=
2016-09-21 18:45:39 [DEBUG] add attribute to model: p1=
2016-09-21 18:45:39 [DEBUG] add attribute to model: invocation=/search/3.8
2016-09-21 18:45:39 [DEBUG] add attribute to model: invocation=/search/3.8
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.validation.BindingResult.parameterBindingResult=net.paoding.rose.web.impl.validation.ParameterBindingResult: 0 errors
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.validation.BindingResult.parameterBindingResult=net.paoding.rose.web.impl.validation.ParameterBindingResult: 0 errors
2016-09-21 18:45:39 [DEBUG] add attribute to model: pipe=pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] add attribute to model: pipe=pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] add attribute to model: invocation=/search/wp1
2016-09-21 18:45:39 [DEBUG] add attribute to model: invocation=/search/wp2
2016-09-21 18:45:39 [DEBUG] add attribute to model: ctxpath=/search
2016-09-21 18:45:39 [DEBUG] add attribute to model: ctxpath=/search
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.validation.BindingResult.parameterBindingResult=net.paoding.rose.web.impl.validation.ParameterBindingResult: 0 errors
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.validation.BindingResult.parameterBindingResult=net.paoding.rose.web.impl.validation.ParameterBindingResult: 0 errors
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window=window[/wp1]
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window=window[/wp2]
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.name=p1
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.name=p2
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose.model=net.paoding.rose.web.var.ModelImpl@2a66ac2e
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose.model=net.paoding.rose.web.var.ModelImpl@3ab215c1
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.apache.catalina.core.DISPATCHER_REQUEST_PATH=/wp1
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose.invocation=/search/wp1
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.apache.catalina.core.DISPATCHER_REQUEST_PATH=/wp2
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.in=true
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose.invocation=/search/wp2
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.web.servlet.support.RequestContext.CONTEXT=WebApplicationContext for namespace 'context@controllers'
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.in=true
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.apache.catalina.core.DISPATCHER_TYPE=FORWARD
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.springframework.web.servlet.support.RequestContext.CONTEXT=WebApplicationContext for namespace 'context@controllers'
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.path=/wp1
2016-09-21 18:45:39 [DEBUG] add attribute to model: org.apache.catalina.core.DISPATCHER_TYPE=FORWARD
2016-09-21 18:45:39 [DEBUG] interceptor[rose.mergeWindowAttributesToModel] do round and return 'portal1'
2016-09-21 18:45:39 [DEBUG] add attribute to model: $$paoding-rose-portal.window.path=/wp2
2016-09-21 18:45:39 [DEBUG] interceptor[rose.windowCancelableSupport] do round and return 'portal1'
2016-09-21 18:45:39 [DEBUG] interceptor[rose.mergeWindowAttributesToModel] do round and return 'portal2'
2016-09-21 18:45:39 [DEBUG] parset instruction:java.lang.String: 'portal1'
2016-09-21 18:45:39 [DEBUG] interceptor[rose.windowCancelableSupport] do round and return 'portal2'
2016-09-21 18:45:39 [DEBUG] parset instruction:net.paoding.rose.web.instruction.InstructionExecutorImpl$StringInstruction: ''
2016-09-21 18:45:39 [DEBUG] parset instruction:java.lang.String: 'portal2'
2016-09-21 18:45:39 [DEBUG] Returning cached instance of singleton bean 'viewDispatcher'
2016-09-21 18:45:39 [DEBUG] parset instruction:net.paoding.rose.web.instruction.InstructionExecutorImpl$StringInstruction: ''
2016-09-21 18:45:39 [DEBUG] resolving view name = 'portal1'
2016-09-21 18:45:39 [DEBUG] Returning cached instance of singleton bean 'viewDispatcher'
2016-09-21 18:45:39 [DEBUG] found '/views/portal1.jsp' for viewName 'portal1'
2016-09-21 18:45:39 [DEBUG] resolving view name = 'portal2'
2016-09-21 18:45:39 [DEBUG] found '/views/portal2.jsp' for viewName 'portal2'
2016-09-21 18:45:39 [DEBUG] to get jsp view resolver.
2016-09-21 18:45:39 [DEBUG] found viewResolver 'org.springframework.web.servlet.view.InternalResourceViewResolver@d11460d' for viewPath '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] add attribute to model: roseInvocation=/search/wp2
2016-09-21 18:45:39 [DEBUG] to get jsp view resolver.
2016-09-21 18:45:39 [DEBUG] Added model object 'ctxpath' of type [java.lang.String] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'roseInvocation' of type [net.paoding.rose.web.impl.thread.InvocationBean] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.apache.catalina.core.DISPATCHER_REQUEST_PATH' of type [java.lang.String] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'p2' of type [net.paoding.rose.web.portal.impl.WindowForView] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] found viewResolver 'org.springframework.web.servlet.view.InternalResourceViewResolver@d11460d' for viewPath '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'p1' of type [net.paoding.rose.web.portal.impl.WindowForView] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] add attribute to model: roseInvocation=/search/wp1
2016-09-21 18:45:39 [DEBUG] Added model object 'invocation' of type [net.paoding.rose.web.impl.thread.InvocationBean] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'ctxpath' of type [java.lang.String] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'roseInvocation' of type [net.paoding.rose.web.impl.thread.InvocationBean] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.springframework.web.servlet.support.RequestContext.CONTEXT' of type [net.paoding.rose.web.impl.module.ModuleAppContext] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.apache.catalina.core.DISPATCHER_REQUEST_PATH' of type [java.lang.String] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.springframework.validation.BindingResult.parameterBindingResult' of type [net.paoding.rose.web.impl.validation.ParameterBindingResult] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'p2' of type [net.paoding.rose.web.portal.impl.WindowForView] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.apache.catalina.core.DISPATCHER_TYPE' of type [javax.servlet.DispatcherType] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'p1' of type [net.paoding.rose.web.portal.impl.WindowForView] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'pipe' of type [net.paoding.rose.web.portal.impl.PipeImpl] to request in view with name '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'invocation' of type [net.paoding.rose.web.impl.thread.InvocationBean] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.springframework.web.servlet.support.RequestContext.CONTEXT' of type [net.paoding.rose.web.impl.module.ModuleAppContext] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.springframework.validation.BindingResult.parameterBindingResult' of type [net.paoding.rose.web.impl.validation.ParameterBindingResult] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'org.apache.catalina.core.DISPATCHER_TYPE' of type [javax.servlet.DispatcherType] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Added model object 'pipe' of type [net.paoding.rose.web.portal.impl.PipeImpl] to request in view with name '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] Forwarding to resource [/views/portal2.jsp] in InternalResourceView '/views/portal2.jsp'
2016-09-21 18:45:39 [DEBUG] Forwarding to resource [/views/portal1.jsp] in InternalResourceView '/views/portal1.jsp'
2016-09-21 18:45:39 [DEBUG] GET http://localhost:8084/search/views/portal1.jsp
2016-09-21 18:45:39 [DEBUG] GET http://localhost:8084/search/views/portal2.jsp
2016-09-21 18:45:39 [DEBUG] notify window 'p1'
2016-09-21 18:45:39 [DEBUG] notify window 'p2'
2016-09-21 18:45:39 [DEBUG] not rose uri: /search/views/portal1.jsp
2016-09-21 18:45:39 [DEBUG] not rose uri: /search/views/portal2.jsp
2016-09-21 18:45:39 [DEBUG] onWindowDone: [p1]@pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] onWindowDone: [p2]@pipe ['/search/3.8']
2016-09-21 18:45:39 [DEBUG] firing 'p1' : add to waiting list
2016-09-21 18:45:39 [DEBUG] firing 'p2' : add to waiting list

jade 与Lombok 的Data注解或者 Thrift的简单bean 的链式编程冲突

当使用链式编程的时候,如Lombok的@accessors(chain = true)注解,pd.getWriteMethod()会返回空导致无法进行映射

参考: https://stackoverflow.com/questions/10806895/why-did-propertydescriptor-behavior-change-from-java-1-6-to-1-7

具体代码位置:
PropertyDescriptor pd = pds[i];
if (pd.getWriteMethod() != null) {
}

jade是不是不支持jdk8?

paoding-rose依赖spring的版本为3.2,我看到网上一篇文章说spring3.2是不支持jdk8的?下面是文章链接地址
http://blog.csdn.net/zl544434558/article/details/44758381
[[email protected]]:I/O failure during jade scanning; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [E:\work\web\apache-tomcat-6.0.37\wtpwebapps\zen-admin\WEB-INF\classes\com\suoluo\zentravel\admin\dao\account\AccountBuyerDAO.class]; nested exception is java.lang.IllegalArgumentException
org.springframework.beans.factory.BeanDefinitionStoreException: I/O failure during jade scanning; nested exception is org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [E:\work\web\apache-tomcat-6.0.37\wtpwebapps\zen-admin\WEB-INF\classes\com\suoluo\zentravel\admin\dao\account\AccountBuyerDAO.class]; nested exception is java.lang.IllegalArgumentException
at net.paoding.rose.jade.context.spring.JadeComponentProvider.findCandidateComponents(JadeComponentProvider.java:205)
at net.paoding.rose.jade.context.spring.JadeBeanFactoryPostProcessor.findJadeDAODefinitions(JadeBeanFactoryPostProcessor.java:373)
at net.paoding.rose.jade.context.spring.JadeBeanFactoryPostProcessor.doPostProcessBeanFactory(JadeBeanFactoryPostProcessor.java:311)
at net.paoding.rose.jade.context.spring.JadeBeanFactoryPostProcessor.postProcessBeanFactory(JadeBeanFactoryPostProcessor.java:295)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:684)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
at net.paoding.rose.RoseFilter.prepareRootApplicationContext(RoseFilter.java:426)
at net.paoding.rose.RoseFilter.initFilterBean(RoseFilter.java:268)
at org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:194)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:424)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:115)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4072)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4726)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [E:\work\web\apache-tomcat-6.0.37\wtpwebapps\zen-admin\WEB-INF\classes\com\suoluo\zentravel\admin\dao\account\AccountBuyerDAO.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:56)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
at net.paoding.rose.jade.context.spring.JadeComponentProvider.findCandidateComponents(JadeComponentProvider.java:175)
... 27 more
Caused by: java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.asm.ClassReader.(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.(SimpleMetadataReader.java:53)
... 30 more

经测试,portal依然不支持tomcat7 和 resin4

http://code.google.com/p/paoding-rose/issues/detail?id=26
上面连接有个回应说:

问题原因:tomcat6和resin3支持的servlet api标准是2.5,而tomcat7、resin4支持的servlet api标准是3.0,portal内部实现servlet api的一个接口时使用的是2.5标准,现在已经使用3.0标准了。

下载了最新的代码,经测试,portal依然不支持tomcat7和resin4 ,报异常为java.lang.AbstractMethodError,在tomcat6上运行没任何问题。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.