Code Monkey home page Code Monkey logo

spring5-samples's People

Contributors

gupaoedu-tom 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

spring5-samples's Issues

com.gupaoedu.mvcframework.v1.servlet.GPDispatcherServlet有bug

函数doScanner里获取url应该是:
URL url = this.getClass().getClassLoader().getResource(scanPackage.replaceAll("\.","/")); getResource使用的是相对路径,不是绝对路径。
函数init里for (String className : mapping.keySet()) {} 这个循环里有问题,因为循环里改动了mapping,往mapping里面放入对象,导致循环出现bug;应该在循环之前把mapping深拷贝一份,为tmpMapping。
如: Map<String,Object> tmpMapping = new HashMap<String, Object>();
for (String className : mapping.keySet()) {
tmpMapping.put(className, mapping.get(className));
}
循环的时候使用tmpMapping
for (String className : tmpMapping.keySet()) {}

别看了,没有一个书里例子跑的通的,代码一塌糊涂

各种跑不通各种有问题,就不说那pom.xml里头多的那些plugins都是些啥了。
本身改改吧,根据自己对spring的理解,还能跑,然后看到这个文件,我惊了,惊得都懒得打英文了
GPAdvisedSupport
里头pattern的regex的处理是个啥东西?你来匹配你的logAspect文件的regex又去匹配handler的名字?还是toString的名字?????

第5篇 spring数据访问 有代码吗?

这部分感觉有点绕,书上的代码跳来跳去的,看不太明白。。。
书上说完整代码让我们自行下载,所以书上只提供了部分代码,可是目前可供下载的代码里没有这一部分

orm实例代码无

花了一周多的时间看这本书,收获确实有,了解了整个过程,但是关于设计模式的运用还是没有讲的太清楚,以及orm的代码没有,在后半部分的学习中有点受阻,了解spring原理是够用的,很多细节也没有展开

com.gupaoedu.demo.mvc.action.DemoAction.java

Line 18:
@GPAutowired private IDemoService demoService;

Line 23-24:
String result = demoService.get(name);
// String result = "My name is " + name;

This is not gonna work. demoService is state as an implement class of IDemoService, but you never initial demoService, get() method will not run.

And this lead to the demoService in this class will be null all the time. Which means the class you put into the mappings in your com.gupaoedu.mvcframework.v1.servlet.GPDispatcherServlet have this as null as well. And the invoke() method will throw null exception.

I am a new learner to spring. But I can't run your code so I tried to find out what happened. I think you have the same problem so that the line 24 is not used.

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.