├── .classpath
├── .gitattributes
├── .gitignore
├── .project
├── .settings
├── .jsdtscope
├── org.eclipse.core.resources.prefs
├── org.eclipse.jdt.core.prefs
├── org.eclipse.m2e.core.prefs
├── org.eclipse.wst.common.component
├── org.eclipse.wst.common.project.facet.core.xml
├── org.eclipse.wst.jsdt.ui.superType.container
├── org.eclipse.wst.jsdt.ui.superType.name
└── org.eclipse.wst.validation.prefs
├── README.md
├── logs
└── ssm.log
├── pom.xml
├── src
├── main
│ ├── java
│ │ └── com
│ │ │ └── javen
│ │ │ ├── controller
│ │ │ └── UserController.java
│ │ │ ├── dao
│ │ │ └── IUserDao.java
│ │ │ ├── mapping
│ │ │ └── UserMapper.xml
│ │ │ ├── model
│ │ │ └── User.java
│ │ │ └── service
│ │ │ ├── IUserService.java
│ │ │ └── impl
│ │ │ └── UserServiceImpl.java
│ ├── resources
│ │ ├── jdbc.properties
│ │ ├── log4j.properties
│ │ ├── spring-mvc.xml
│ │ └── spring-mybatis.xml
│ └── webapp
│ │ ├── WEB-INF
│ │ ├── jsp
│ │ │ ├── index.jsp
│ │ │ ├── showUser.jsp
│ │ │ ├── succes.jsp
│ │ │ └── user_admin
│ │ │ │ └── file.jsp
│ │ └── web.xml
│ │ └── index.jsp
└── test
│ └── java
│ └── com
│ └── javen
│ └── testmybatis
│ └── TestMyBatis.java
└── target
├── classes
├── com
│ └── javen
│ │ ├── controller
│ │ └── UserController.class
│ │ ├── dao
│ │ └── IUserDao.class
│ │ ├── mapping
│ │ └── UserMapper.xml
│ │ ├── model
│ │ └── User.class
│ │ └── service
│ │ ├── IUserService.class
│ │ └── impl
│ │ └── UserServiceImpl.class
├── jdbc.properties
├── log4j.properties
├── spring-mvc.xml
└── spring-mybatis.xml
├── m2e-wtp
└── web-resources
│ └── META-INF
│ ├── MANIFEST.MF
│ └── maven
│ └── com.javen.maven02
│ └── maven02
│ ├── pom.properties
│ └── pom.xml
├── maven-status
└── maven-compiler-plugin
│ ├── compile
│ └── default-compile
│ │ ├── createdFiles.lst
│ │ └── inputFiles.lst
│ └── testCompile
│ └── default-testCompile
│ ├── createdFiles.lst
│ └── inputFiles.lst
├── test-classes
└── com
│ └── javen
│ └── testmybatis
│ └── TestMyBatis.class
└── tmp
└── jsp
└── org
└── apache
└── jsp
└── WEB_002dINF
└── jsp
├── index_jsp.class
└── index_jsp.java
/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Windows image file caches
2 | Thumbs.db
3 | ehthumbs.db
4 |
5 | # Folder config file
6 | Desktop.ini
7 |
8 | # Recycle Bin used on file shares
9 | $RECYCLE.BIN/
10 |
11 | # Windows Installer files
12 | *.cab
13 | *.msi
14 | *.msm
15 | *.msp
16 |
17 | # Windows shortcuts
18 | *.lnk
19 |
20 | # =========================
21 | # Operating System Files
22 | # =========================
23 |
24 | # OSX
25 | # =========================
26 |
27 | .DS_Store
28 | .AppleDouble
29 | .LSOverride
30 |
31 | # Thumbnails
32 | ._*
33 |
34 | # Files that might appear on external disk
35 | .Spotlight-V100
36 | .Trashes
37 |
38 | # Directories potentially created on remote AFP share
39 | .AppleDB
40 | .AppleDesktop
41 | Network Trash Folder
42 | Temporary Items
43 | .apdisk
44 |
--------------------------------------------------------------------------------
/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | maven02
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.jsdt.core.javascriptValidator
10 |
11 |
12 |
13 |
14 | org.eclipse.jdt.core.javabuilder
15 |
16 |
17 |
18 |
19 | org.eclipse.wst.common.project.facet.core.builder
20 |
21 |
22 |
23 |
24 | org.eclipse.wst.validation.validationbuilder
25 |
26 |
27 |
28 |
29 | org.eclipse.m2e.core.maven2Builder
30 |
31 |
32 |
33 |
34 |
35 | org.eclipse.jem.workbench.JavaEMFNature
36 | org.eclipse.wst.common.modulecore.ModuleCoreNature
37 | org.eclipse.jdt.core.javanature
38 | org.eclipse.m2e.core.maven2Nature
39 | org.eclipse.wst.common.project.facet.core.nature
40 | org.eclipse.wst.jsdt.core.jsNature
41 |
42 |
43 |
--------------------------------------------------------------------------------
/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.core.resources.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | encoding//src/main/resources/jdbc.properties=UTF-8
3 | encoding//src/main/resources/log4j.properties=UTF-8
4 | encoding/=UTF-8
5 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.jdt.core.prefs:
--------------------------------------------------------------------------------
1 | eclipse.preferences.version=1
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
4 | org.eclipse.jdt.core.compiler.compliance=1.5
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
8 | org.eclipse.jdt.core.compiler.source=1.5
9 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.m2e.core.prefs:
--------------------------------------------------------------------------------
1 | activeProfiles=
2 | eclipse.preferences.version=1
3 | resolveWorkspaceProjects=true
4 | version=1
5 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/.settings/org.eclipse.wst.validation.prefs:
--------------------------------------------------------------------------------
1 | disabled=06target
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SSM
2 | SSM框架——详细整合教程(Spring+SpringMVC+MyBatis)
3 | 博客地址http://www.cnblogs.com/zyw-205520/p/4771253.html
4 |
--------------------------------------------------------------------------------
/logs/ssm.log:
--------------------------------------------------------------------------------
1 | [INFO] [2015-08-30 16:31:46][org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
2 | [INFO] [2015-08-30 16:31:47][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Aug 30 16:31:47 CST 2015]; root of context hierarchy
3 | [INFO] [2015-08-30 16:31:47][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
4 | [ERROR] [2015-08-30 16:31:47][org.springframework.web.context.ContextLoader]Context initialization failed
5 | org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
6 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)
7 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
8 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
9 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
10 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
11 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
12 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
13 | at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
14 | at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)
15 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
16 | at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
17 | at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
18 | at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
19 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
20 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
21 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
22 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
23 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
24 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)
25 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
26 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
27 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
28 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:365)
29 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
30 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
31 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
32 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
33 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163)
34 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
35 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
36 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
37 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
38 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
39 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
40 | at org.eclipse.jetty.server.Server.start(Server.java:387)
41 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
42 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
43 | at org.eclipse.jetty.server.Server.doStart(Server.java:354)
44 | at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:73)
45 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
46 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:534)
47 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:357)
48 | at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:167)
49 | at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
50 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
51 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
52 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
53 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
54 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
55 | at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
56 | at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
57 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
58 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
59 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
60 | at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
61 | at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
62 | at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
63 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
64 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
65 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
66 | at java.lang.reflect.Method.invoke(Unknown Source)
67 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
68 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
69 | at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
70 | at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
71 | Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
72 | at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141)
73 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
74 | ... 64 more
75 | [INFO] [2015-08-30 16:40:10][org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
76 | [INFO] [2015-08-30 16:40:10][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Aug 30 16:40:10 CST 2015]; root of context hierarchy
77 | [INFO] [2015-08-30 16:40:10][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
78 | [ERROR] [2015-08-30 16:40:10][org.springframework.web.context.ContextLoader]Context initialization failed
79 | org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
80 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)
81 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
82 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
83 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
84 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
85 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
86 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
87 | at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
88 | at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)
89 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
90 | at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
91 | at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
92 | at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
93 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
94 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
95 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
96 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
97 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
98 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)
99 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
100 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
101 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
102 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:365)
103 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
104 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
105 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
106 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
107 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163)
108 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
109 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
110 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
111 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
112 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
113 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
114 | at org.eclipse.jetty.server.Server.start(Server.java:387)
115 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
116 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
117 | at org.eclipse.jetty.server.Server.doStart(Server.java:354)
118 | at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:73)
119 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
120 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:534)
121 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:357)
122 | at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:167)
123 | at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
124 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
125 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
126 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
127 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
128 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
129 | at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
130 | at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
131 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
132 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
133 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
134 | at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
135 | at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
136 | at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
137 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
138 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
139 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
140 | at java.lang.reflect.Method.invoke(Unknown Source)
141 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
142 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
143 | at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
144 | at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
145 | Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
146 | at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141)
147 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
148 | ... 64 more
149 | [INFO] [2015-08-30 16:48:01][org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
150 | [INFO] [2015-08-30 16:48:01][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Aug 30 16:48:01 CST 2015]; root of context hierarchy
151 | [INFO] [2015-08-30 16:48:01][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
152 | [ERROR] [2015-08-30 16:48:01][org.springframework.web.context.ContextLoader]Context initialization failed
153 | org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
154 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:343)
155 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
156 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
157 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
158 | at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
159 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
160 | at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
161 | at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
162 | at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)
163 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
164 | at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
165 | at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
166 | at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
167 | at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
168 | at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
169 | at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
170 | at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
171 | at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
172 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)
173 | at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
174 | at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
175 | at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
176 | at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:365)
177 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
178 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
179 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
180 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
181 | at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163)
182 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
183 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
184 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
185 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
186 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
187 | at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
188 | at org.eclipse.jetty.server.Server.start(Server.java:387)
189 | at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
190 | at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
191 | at org.eclipse.jetty.server.Server.doStart(Server.java:354)
192 | at org.eclipse.jetty.maven.plugin.JettyServer.doStart(JettyServer.java:73)
193 | at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
194 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:534)
195 | at org.eclipse.jetty.maven.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:357)
196 | at org.eclipse.jetty.maven.plugin.JettyRunMojo.execute(JettyRunMojo.java:167)
197 | at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
198 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
199 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
200 | at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
201 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
202 | at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
203 | at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
204 | at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
205 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
206 | at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
207 | at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
208 | at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
209 | at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
210 | at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
211 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
212 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
213 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
214 | at java.lang.reflect.Method.invoke(Unknown Source)
215 | at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
216 | at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
217 | at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
218 | at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
219 | Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
220 | at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141)
221 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:329)
222 | ... 64 more
223 | [INFO] [2015-08-30 16:49:26][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization started
224 | [INFO] [2015-08-30 16:49:27][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing WebApplicationContext for namespace 'SpringMVC-servlet': startup date [Sun Aug 30 16:49:27 CST 2015]; root of context hierarchy
225 | [INFO] [2015-08-30 16:49:27][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-mvc.xml]
226 | [INFO] [2015-08-30 16:49:28][org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
227 | [INFO] [2015-08-30 16:49:28][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/test],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.test(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model)
228 | [INFO] [2015-08-30 16:49:29][org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]Mapped URL path [/resources] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
229 | [INFO] [2015-08-30 16:49:29][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization completed in 2946 ms
230 | [WARN] [2015-08-30 16:49:46][org.springframework.web.servlet.PageNotFound]No mapping found for HTTP request with URI [/user/test/1] in DispatcherServlet with name 'SpringMVC'
231 | [INFO] [2015-08-30 16:58:03][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization started
232 | [INFO] [2015-08-30 16:58:03][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing WebApplicationContext for namespace 'SpringMVC-servlet': startup date [Sun Aug 30 16:58:03 CST 2015]; root of context hierarchy
233 | [INFO] [2015-08-30 16:58:03][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-mvc.xml]
234 | [INFO] [2015-08-30 16:58:03][org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
235 | [INFO] [2015-08-30 16:58:03][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/test],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.test(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model)
236 | [INFO] [2015-08-30 16:58:04][org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]Mapped URL path [/resources] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
237 | [INFO] [2015-08-30 16:58:04][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization completed in 1476 ms
238 | [INFO] [2015-08-30 17:34:30][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-mybatis.xml]
239 | [INFO] [2015-08-30 17:34:31][org.springframework.context.support.GenericApplicationContext]Refreshing org.springframework.context.support.GenericApplicationContext@2ef9b8bc: startup date [Sun Aug 30 17:34:31 CST 2015]; root of context hierarchy
240 | [INFO] [2015-08-30 17:34:32][org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [jdbc.properties]
241 | [INFO] [2015-08-30 17:34:32][org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
242 | [INFO] [2015-08-30 17:34:34][com.javen.testmybatis.TestMyBatis]{"age":10,"id":2,"password":"123","userName":"javen"}
243 | [INFO] [2015-08-30 17:34:34][org.springframework.context.support.GenericApplicationContext]Closing org.springframework.context.support.GenericApplicationContext@2ef9b8bc: startup date [Sun Aug 30 17:34:31 CST 2015]; root of context hierarchy
244 | [INFO] [2015-08-30 17:37:35][org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization started
245 | [INFO] [2015-08-30 17:37:35][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing Root WebApplicationContext: startup date [Sun Aug 30 17:37:35 CST 2015]; root of context hierarchy
246 | [INFO] [2015-08-30 17:37:35][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-mybatis.xml]
247 | [INFO] [2015-08-30 17:37:36][org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]Loading properties file from class path resource [jdbc.properties]
248 | [INFO] [2015-08-30 17:37:36][org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
249 | [INFO] [2015-08-30 17:37:36][org.springframework.web.context.ContextLoader]Root WebApplicationContext: initialization completed in 1173 ms
250 | [INFO] [2015-08-30 17:37:40][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization started
251 | [INFO] [2015-08-30 17:37:40][org.springframework.web.context.support.XmlWebApplicationContext]Refreshing WebApplicationContext for namespace 'SpringMVC-servlet': startup date [Sun Aug 30 17:37:40 CST 2015]; parent: Root WebApplicationContext
252 | [INFO] [2015-08-30 17:37:40][org.springframework.beans.factory.xml.XmlBeanDefinitionReader]Loading XML bean definitions from class path resource [spring-mvc.xml]
253 | [INFO] [2015-08-30 17:37:41][org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor]JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
254 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/test],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.test(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model)
255 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/showUser],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.toIndex(javax.servlet.http.HttpServletRequest,org.springframework.ui.Model)
256 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/doUpload],methods=[POST],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.doUploadFile(org.springframework.web.multipart.MultipartFile) throws java.io.IOException
257 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/{id}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public com.javen.model.User com.javen.controller.UserController.getUserInJson(java.lang.String,java.util.Map)
258 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/upload],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.showUploadPage()
259 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/showUser3/{id}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.toIndex3(java.lang.String,java.util.Map)
260 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/jsontype/{id}],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.http.ResponseEntity com.javen.controller.UserController.getUserInJson2(java.lang.String,java.util.Map)
261 | [INFO] [2015-08-30 17:37:44][org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]Mapped "{[/user/showUser2],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public java.lang.String com.javen.controller.UserController.toIndex2(java.lang.String,org.springframework.ui.Model)
262 | [INFO] [2015-08-30 17:37:45][org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]Mapped URL path [/resources] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
263 | [INFO] [2015-08-30 17:37:45][org.springframework.web.servlet.DispatcherServlet]FrameworkServlet 'SpringMVC': initialization completed in 4837 ms
264 | [INFO] [2015-08-30 17:38:22][com.javen.controller.UserController]User [id=2, userName=javen, password=123, age=10]
265 |
--------------------------------------------------------------------------------
/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | com.javen.maven02
5 | maven02
6 | war
7 | 0.0.1-SNAPSHOT
8 | maven01 Maven Webapp
9 | http://maven.apache.org
10 |
11 |
12 |
13 | 4.0.2.RELEASE
14 |
15 | 3.2.6
16 |
17 | 1.7.7
18 | 1.2.17
19 |
20 |
21 |
22 |
23 | junit
24 | junit
25 | 3.8.1
26 |
27 | test
28 |
29 |
34 |
35 |
36 |
37 | org.springframework
38 | spring-core
39 | ${spring.version}
40 |
41 |
42 |
43 | org.springframework
44 | spring-web
45 | ${spring.version}
46 |
47 |
48 | org.springframework
49 | spring-oxm
50 | ${spring.version}
51 |
52 |
53 | org.springframework
54 | spring-tx
55 | ${spring.version}
56 |
57 |
58 |
59 | org.springframework
60 | spring-jdbc
61 | ${spring.version}
62 |
63 |
64 |
65 | org.springframework
66 | spring-webmvc
67 | ${spring.version}
68 |
69 |
70 | org.springframework
71 | spring-aop
72 | ${spring.version}
73 |
74 |
75 |
76 | org.springframework
77 | spring-context-support
78 | ${spring.version}
79 |
80 |
81 |
82 | org.springframework
83 | spring-test
84 | ${spring.version}
85 |
86 |
87 |
88 | org.mybatis
89 | mybatis
90 | ${mybatis.version}
91 |
92 |
93 |
94 | org.mybatis
95 | mybatis-spring
96 | 1.2.2
97 |
98 |
99 |
100 |
101 | javax
102 | javaee-api
103 | 7.0
104 |
105 |
106 |
107 |
108 | mysql
109 | mysql-connector-java
110 | 5.1.36
111 |
112 |
113 |
114 | commons-dbcp
115 | commons-dbcp
116 | 1.2.2
117 |
118 |
119 |
120 |
121 | jstl
122 | jstl
123 | 1.2
124 |
125 |
126 |
127 |
128 | log4j
129 | log4j
130 | ${log4j.version}
131 |
132 |
133 |
134 |
135 |
136 | com.alibaba
137 | fastjson
138 | 1.1.41
139 |
140 |
141 |
142 |
143 | org.slf4j
144 | slf4j-api
145 | ${slf4j.version}
146 |
147 |
148 |
149 | org.slf4j
150 | slf4j-log4j12
151 | ${slf4j.version}
152 |
153 |
154 |
155 |
156 | org.codehaus.jackson
157 | jackson-mapper-asl
158 | 1.9.13
159 |
160 |
161 |
162 | commons-fileupload
163 | commons-fileupload
164 | 1.3.1
165 |
166 |
167 | commons-io
168 | commons-io
169 | 2.4
170 |
171 |
172 | commons-codec
173 | commons-codec
174 | 1.9
175 |
176 |
177 |
178 |
179 |
180 | maven02
181 |
182 |
183 | org.eclipse.jetty
184 | jetty-maven-plugin
185 | 9.2.8.v20150217
186 |
187 |
188 | 80
189 |
190 | shutdown
191 | 9966
192 |
193 |
194 |
195 |
196 |
197 |
198 |
--------------------------------------------------------------------------------
/src/main/java/com/javen/controller/UserController.java:
--------------------------------------------------------------------------------
1 | package com.javen.controller;
2 | import java.io.File;
3 | import java.io.IOException;
4 | import java.util.Map;
5 |
6 | import javax.annotation.Resource;
7 | import javax.servlet.http.HttpServletRequest;
8 |
9 | import org.apache.commons.io.FileUtils;
10 | import org.slf4j.Logger;
11 | import org.slf4j.LoggerFactory;
12 | import org.springframework.http.HttpStatus;
13 | import org.springframework.http.ResponseEntity;
14 | import org.springframework.stereotype.Controller;
15 | import org.springframework.ui.Model;
16 | import org.springframework.web.bind.annotation.PathVariable;
17 | import org.springframework.web.bind.annotation.RequestMapping;
18 | import org.springframework.web.bind.annotation.RequestMethod;
19 | import org.springframework.web.bind.annotation.RequestParam;
20 | import org.springframework.web.bind.annotation.ResponseBody;
21 | import org.springframework.web.multipart.MultipartFile;
22 |
23 | import com.javen.model.User;
24 | import com.javen.service.IUserService;
25 |
26 |
27 | @Controller
28 | @RequestMapping("/user")
29 | // /user/**
30 | public class UserController {
31 | private static Logger log=LoggerFactory.getLogger(UserController.class);
32 | @Resource
33 | private IUserService userService;
34 |
35 | // /user/test?id=1
36 | @RequestMapping(value="/test",method=RequestMethod.GET)
37 | public String test(HttpServletRequest request,Model model){
38 | int userId = Integer.parseInt(request.getParameter("id"));
39 | System.out.println("userId:"+userId);
40 | User user=null;
41 | if (userId==1) {
42 | user = new User();
43 | user.setAge(11);
44 | user.setId(1);
45 | user.setPassword("123");
46 | user.setUserName("javen");
47 | }
48 |
49 | log.debug(user.toString());
50 | model.addAttribute("user", user);
51 | return "index";
52 | }
53 |
54 |
55 | // /user/showUser?id=1
56 | @RequestMapping(value="/showUser",method=RequestMethod.GET)
57 | public String toIndex(HttpServletRequest request,Model model){
58 | int userId = Integer.parseInt(request.getParameter("id"));
59 | System.out.println("userId:"+userId);
60 | User user = this.userService.getUserById(userId);
61 | log.debug(user.toString());
62 | model.addAttribute("user", user);
63 | return "showUser";
64 | }
65 |
66 | // /user/showUser2?id=1
67 | @RequestMapping(value="/showUser2",method=RequestMethod.GET)
68 | public String toIndex2(@RequestParam("id") String id,Model model){
69 | int userId = Integer.parseInt(id);
70 | System.out.println("userId:"+userId);
71 | User user = this.userService.getUserById(userId);
72 | log.debug(user.toString());
73 | model.addAttribute("user", user);
74 | return "showUser";
75 | }
76 |
77 |
78 | // /user/showUser3/{id}
79 | @RequestMapping(value="/showUser3/{id}",method=RequestMethod.GET)
80 | public String toIndex3(@PathVariable("id")String id,Map model){
81 | int userId = Integer.parseInt(id);
82 | System.out.println("userId:"+userId);
83 | User user = this.userService.getUserById(userId);
84 | log.debug(user.toString());
85 | model.put("user", user);
86 | return "showUser";
87 | }
88 |
89 | // /user/{id}
90 | @RequestMapping(value="/{id}",method=RequestMethod.GET)
91 | public @ResponseBody User getUserInJson(@PathVariable String id,Map model){
92 | int userId = Integer.parseInt(id);
93 | System.out.println("userId:"+userId);
94 | User user = this.userService.getUserById(userId);
95 | log.info(user.toString());
96 | return user;
97 | }
98 |
99 | // /user/{id}
100 | @RequestMapping(value="/jsontype/{id}",method=RequestMethod.GET)
101 | public ResponseEntity getUserInJson2(@PathVariable String id,Map model){
102 | int userId = Integer.parseInt(id);
103 | System.out.println("userId:"+userId);
104 | User user = this.userService.getUserById(userId);
105 | log.info(user.toString());
106 | return new ResponseEntity(user,HttpStatus.OK);
107 | }
108 |
109 | //文件上传、
110 | @RequestMapping(value="/upload")
111 | public String showUploadPage(){
112 | return "user_admin/file";
113 | }
114 |
115 | @RequestMapping(value="/doUpload",method=RequestMethod.POST)
116 | public String doUploadFile(@RequestParam("file")MultipartFile file) throws IOException{
117 | if (!file.isEmpty()) {
118 | log.info("Process file:{}",file.getOriginalFilename());
119 | }
120 | FileUtils.copyInputStreamToFile(file.getInputStream(), new File("E:\\",System.currentTimeMillis()+file.getOriginalFilename()));
121 | return "succes";
122 | }
123 | }
--------------------------------------------------------------------------------
/src/main/java/com/javen/dao/IUserDao.java:
--------------------------------------------------------------------------------
1 | package com.javen.dao;
2 |
3 | import com.javen.model.User;
4 |
5 |
6 | public interface IUserDao {
7 | int deleteByPrimaryKey(Integer id);
8 |
9 | int insert(User record);
10 |
11 | int insertSelective(User record);
12 |
13 | User selectByPrimaryKey(Integer id);
14 |
15 | int updateByPrimaryKeySelective(User record);
16 |
17 | int updateByPrimaryKey(User record);
18 | }
--------------------------------------------------------------------------------
/src/main/java/com/javen/mapping/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | id, user_name, password, age
12 |
13 |
19 |
20 | delete from user_t
21 | where id = #{id,jdbcType=INTEGER}
22 |
23 |
24 | insert into user_t (id, user_name, password,
25 | age)
26 | values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
27 | #{age,jdbcType=INTEGER})
28 |
29 |
30 | insert into user_t
31 |
32 |
33 | id,
34 |
35 |
36 | user_name,
37 |
38 |
39 | password,
40 |
41 |
42 | age,
43 |
44 |
45 |
46 |
47 | #{id,jdbcType=INTEGER},
48 |
49 |
50 | #{userName,jdbcType=VARCHAR},
51 |
52 |
53 | #{password,jdbcType=VARCHAR},
54 |
55 |
56 | #{age,jdbcType=INTEGER},
57 |
58 |
59 |
60 |
61 | update user_t
62 |
63 |
64 | user_name = #{userName,jdbcType=VARCHAR},
65 |
66 |
67 | password = #{password,jdbcType=VARCHAR},
68 |
69 |
70 | age = #{age,jdbcType=INTEGER},
71 |
72 |
73 | where id = #{id,jdbcType=INTEGER}
74 |
75 |
76 | update user_t
77 | set user_name = #{userName,jdbcType=VARCHAR},
78 | password = #{password,jdbcType=VARCHAR},
79 | age = #{age,jdbcType=INTEGER}
80 | where id = #{id,jdbcType=INTEGER}
81 |
82 |
--------------------------------------------------------------------------------
/src/main/java/com/javen/model/User.java:
--------------------------------------------------------------------------------
1 | package com.javen.model;
2 |
3 | public class User {
4 | private Integer id;
5 |
6 | private String userName;
7 |
8 | private String password;
9 |
10 | private Integer age;
11 |
12 | public Integer getId() {
13 | return id;
14 | }
15 |
16 | public void setId(Integer id) {
17 | this.id = id;
18 | }
19 |
20 | public String getUserName() {
21 | return userName;
22 | }
23 |
24 | public void setUserName(String userName) {
25 | this.userName = userName == null ? null : userName.trim();
26 | }
27 |
28 | public String getPassword() {
29 | return password;
30 | }
31 |
32 | public void setPassword(String password) {
33 | this.password = password == null ? null : password.trim();
34 | }
35 |
36 | public Integer getAge() {
37 | return age;
38 | }
39 |
40 | public void setAge(Integer age) {
41 | this.age = age;
42 | }
43 |
44 | @Override
45 | public String toString() {
46 | return "User [id=" + id + ", userName=" + userName + ", password="
47 | + password + ", age=" + age + "]";
48 | }
49 |
50 |
51 | }
--------------------------------------------------------------------------------
/src/main/java/com/javen/service/IUserService.java:
--------------------------------------------------------------------------------
1 | package com.javen.service;
2 |
3 | import com.javen.model.User;
4 |
5 |
6 | public interface IUserService {
7 | public User getUserById(int userId);
8 | }
--------------------------------------------------------------------------------
/src/main/java/com/javen/service/impl/UserServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.javen.service.impl;
2 | import javax.annotation.Resource;
3 |
4 |
5 |
6 |
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.javen.dao.IUserDao;
10 | import com.javen.model.User;
11 | import com.javen.service.IUserService;
12 |
13 |
14 | @Service("userService")
15 | public class UserServiceImpl implements IUserService {
16 | @Resource
17 | private IUserDao userDao;
18 |
19 | public User getUserById(int userId) {
20 | // TODO Auto-generated method stub
21 | return this.userDao.selectByPrimaryKey(userId);
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/resources/jdbc.properties:
--------------------------------------------------------------------------------
1 | driver=com.mysql.jdbc.Driver
2 | url=jdbc:mysql://localhost:3306/maven
3 | username=root
4 | password=root
5 | #定义初始连接数
6 | initialSize=0
7 | #定义最大连接数
8 | maxActive=20
9 | #定义最大空闲
10 | maxIdle=20
11 | #定义最小空闲
12 | minIdle=1
13 | #定义最长等待时间
14 | maxWait=60000
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/main/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=INFO,Console,File
2 | #定义日志输出目的地为控制台
3 | log4j.appender.Console=org.apache.log4j.ConsoleAppender
4 | log4j.appender.Console.Target=System.out
5 | #可以灵活地指定日志输出格式,下面一行是指定具体的格式
6 | log4j.appender.Console.layout = org.apache.log4j.PatternLayout
7 | log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n
8 |
9 | #文件大小到达指定尺寸的时候产生一个新的文件
10 | log4j.appender.File = org.apache.log4j.RollingFileAppender
11 | #指定输出目录
12 | log4j.appender.File.File = logs/ssm.log
13 | #定义文件最大大小
14 | log4j.appender.File.MaxFileSize = 10MB
15 | # 输出所以日志,如果换成DEBUG表示输出DEBUG以上级别日志
16 | log4j.appender.File.Threshold = ALL
17 | log4j.appender.File.layout = org.apache.log4j.PatternLayout
18 | log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n
--------------------------------------------------------------------------------
/src/main/resources/spring-mvc.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
24 | text/html;charset=UTF-8
25 |
26 |
27 |
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/src/main/resources/spring-mybatis.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/index.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World!
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/showUser.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2 |
3 |
4 |
5 | 测试
6 |
7 |
8 |
9 | ${user.userName}
10 |
11 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/succes.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World!
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/jsp/user_admin/file.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" contentType="text/html; charset=utf-8"
2 | pageEncoding="utf-8"%>
3 |
4 |
5 |
6 |
7 | Insert title here
8 |
9 |
10 | 上传文件
11 |
16 |
17 |
--------------------------------------------------------------------------------
/src/main/webapp/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | Archetype Created Web Application
7 |
8 |
9 | contextConfigLocation
10 | classpath:spring-mybatis.xml
11 |
12 |
13 |
14 | encodingFilter
15 | org.springframework.web.filter.CharacterEncodingFilter
16 | true
17 |
18 | encoding
19 | UTF-8
20 |
21 |
22 |
23 | encodingFilter
24 | /*
25 |
26 |
27 |
28 | org.springframework.web.context.ContextLoaderListener
29 |
30 |
31 |
32 | org.springframework.web.util.IntrospectorCleanupListener
33 |
34 |
35 |
36 |
37 | SpringMVC
38 | org.springframework.web.servlet.DispatcherServlet
39 |
40 | contextConfigLocation
41 | classpath:spring-mvc.xml
42 |
43 | 1
44 | true
45 |
46 |
47 | SpringMVC
48 |
49 | /
50 |
51 |
52 | /index.jsp
53 |
54 |
55 |
--------------------------------------------------------------------------------
/src/main/webapp/index.jsp:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World!
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/test/java/com/javen/testmybatis/TestMyBatis.java:
--------------------------------------------------------------------------------
1 | package com.javen.testmybatis;
2 |
3 | import javax.annotation.Resource;
4 |
5 | import org.apache.log4j.Logger;
6 | import org.junit.Test;
7 | import org.junit.runner.RunWith;
8 | import org.springframework.test.context.ContextConfiguration;
9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10 | import com.alibaba.fastjson.JSON;
11 | import com.javen.model.User;
12 | import com.javen.service.IUserService;
13 |
14 | @RunWith(SpringJUnit4ClassRunner.class) //表示继承了SpringJUnit4ClassRunner类
15 | @ContextConfiguration(locations = {"classpath:spring-mybatis.xml"})
16 |
17 | public class TestMyBatis {
18 | private static Logger logger = Logger.getLogger(TestMyBatis.class);
19 | // private ApplicationContext ac = null;
20 | @Resource
21 | private IUserService userService = null;
22 |
23 | // @Before
24 | // public void before() {
25 | // ac = new ClassPathXmlApplicationContext("applicationContext.xml");
26 | // userService = (IUserService) ac.getBean("userService");
27 | // }
28 |
29 | @Test
30 | public void test1() {
31 | User user = userService.getUserById(2);
32 | // System.out.println(user.getUserName());
33 | // logger.info("值:"+user.getUserName());
34 | logger.info(JSON.toJSONString(user));
35 | }
36 | }
--------------------------------------------------------------------------------
/target/classes/com/javen/controller/UserController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/classes/com/javen/controller/UserController.class
--------------------------------------------------------------------------------
/target/classes/com/javen/dao/IUserDao.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/classes/com/javen/dao/IUserDao.class
--------------------------------------------------------------------------------
/target/classes/com/javen/mapping/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | id, user_name, password, age
12 |
13 |
19 |
20 | delete from user_t
21 | where id = #{id,jdbcType=INTEGER}
22 |
23 |
24 | insert into user_t (id, user_name, password,
25 | age)
26 | values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
27 | #{age,jdbcType=INTEGER})
28 |
29 |
30 | insert into user_t
31 |
32 |
33 | id,
34 |
35 |
36 | user_name,
37 |
38 |
39 | password,
40 |
41 |
42 | age,
43 |
44 |
45 |
46 |
47 | #{id,jdbcType=INTEGER},
48 |
49 |
50 | #{userName,jdbcType=VARCHAR},
51 |
52 |
53 | #{password,jdbcType=VARCHAR},
54 |
55 |
56 | #{age,jdbcType=INTEGER},
57 |
58 |
59 |
60 |
61 | update user_t
62 |
63 |
64 | user_name = #{userName,jdbcType=VARCHAR},
65 |
66 |
67 | password = #{password,jdbcType=VARCHAR},
68 |
69 |
70 | age = #{age,jdbcType=INTEGER},
71 |
72 |
73 | where id = #{id,jdbcType=INTEGER}
74 |
75 |
76 | update user_t
77 | set user_name = #{userName,jdbcType=VARCHAR},
78 | password = #{password,jdbcType=VARCHAR},
79 | age = #{age,jdbcType=INTEGER}
80 | where id = #{id,jdbcType=INTEGER}
81 |
82 |
--------------------------------------------------------------------------------
/target/classes/com/javen/model/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/classes/com/javen/model/User.class
--------------------------------------------------------------------------------
/target/classes/com/javen/service/IUserService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/classes/com/javen/service/IUserService.class
--------------------------------------------------------------------------------
/target/classes/com/javen/service/impl/UserServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/classes/com/javen/service/impl/UserServiceImpl.class
--------------------------------------------------------------------------------
/target/classes/jdbc.properties:
--------------------------------------------------------------------------------
1 | driver=com.mysql.jdbc.Driver
2 | url=jdbc:mysql://localhost:3306/maven
3 | username=root
4 | password=root
5 | #定义初始连接数
6 | initialSize=0
7 | #定义最大连接数
8 | maxActive=20
9 | #定义最大空闲
10 | maxIdle=20
11 | #定义最小空闲
12 | minIdle=1
13 | #定义最长等待时间
14 | maxWait=60000
15 |
16 |
17 |
--------------------------------------------------------------------------------
/target/classes/log4j.properties:
--------------------------------------------------------------------------------
1 | log4j.rootLogger=INFO,Console,File
2 | #定义日志输出目的地为控制台
3 | log4j.appender.Console=org.apache.log4j.ConsoleAppender
4 | log4j.appender.Console.Target=System.out
5 | #可以灵活地指定日志输出格式,下面一行是指定具体的格式
6 | log4j.appender.Console.layout = org.apache.log4j.PatternLayout
7 | log4j.appender.Console.layout.ConversionPattern=[%c] - %m%n
8 |
9 | #文件大小到达指定尺寸的时候产生一个新的文件
10 | log4j.appender.File = org.apache.log4j.RollingFileAppender
11 | #指定输出目录
12 | log4j.appender.File.File = logs/ssm.log
13 | #定义文件最大大小
14 | log4j.appender.File.MaxFileSize = 10MB
15 | # 输出所以日志,如果换成DEBUG表示输出DEBUG以上级别日志
16 | log4j.appender.File.Threshold = ALL
17 | log4j.appender.File.layout = org.apache.log4j.PatternLayout
18 | log4j.appender.File.layout.ConversionPattern =[%p] [%d{yyyy-MM-dd HH\:mm\:ss}][%c]%m%n
--------------------------------------------------------------------------------
/target/classes/spring-mvc.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
24 | text/html;charset=UTF-8
25 |
26 |
27 |
28 |
29 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/target/classes/spring-mybatis.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
13 |
14 |
15 |
16 |
18 |
19 |
20 |
21 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/target/m2e-wtp/web-resources/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Built-By: Javen
3 | Build-Jdk: 1.8.0_45
4 | Created-By: Maven Integration for Eclipse
5 |
6 |
--------------------------------------------------------------------------------
/target/m2e-wtp/web-resources/META-INF/maven/com.javen.maven02/maven02/pom.properties:
--------------------------------------------------------------------------------
1 | #Generated by Maven Integration for Eclipse
2 | #Sun Aug 30 17:36:26 CST 2015
3 | version=0.0.1-SNAPSHOT
4 | groupId=com.javen.maven02
5 | m2e.projectName=maven02
6 | m2e.projectLocation=E\:\\Code\\Java\\Weixin\\maven02
7 | artifactId=maven02
8 |
--------------------------------------------------------------------------------
/target/m2e-wtp/web-resources/META-INF/maven/com.javen.maven02/maven02/pom.xml:
--------------------------------------------------------------------------------
1 |
3 | 4.0.0
4 | com.javen.maven02
5 | maven02
6 | war
7 | 0.0.1-SNAPSHOT
8 | maven01 Maven Webapp
9 | http://maven.apache.org
10 |
11 |
12 |
13 | 4.0.2.RELEASE
14 |
15 | 3.2.6
16 |
17 | 1.7.7
18 | 1.2.17
19 |
20 |
21 |
22 |
23 | junit
24 | junit
25 | 3.8.1
26 |
27 | test
28 |
29 |
34 |
35 |
36 |
37 | org.springframework
38 | spring-core
39 | ${spring.version}
40 |
41 |
42 |
43 | org.springframework
44 | spring-web
45 | ${spring.version}
46 |
47 |
48 | org.springframework
49 | spring-oxm
50 | ${spring.version}
51 |
52 |
53 | org.springframework
54 | spring-tx
55 | ${spring.version}
56 |
57 |
58 |
59 | org.springframework
60 | spring-jdbc
61 | ${spring.version}
62 |
63 |
64 |
65 | org.springframework
66 | spring-webmvc
67 | ${spring.version}
68 |
69 |
70 | org.springframework
71 | spring-aop
72 | ${spring.version}
73 |
74 |
75 |
76 | org.springframework
77 | spring-context-support
78 | ${spring.version}
79 |
80 |
81 |
82 | org.springframework
83 | spring-test
84 | ${spring.version}
85 |
86 |
87 |
88 | org.mybatis
89 | mybatis
90 | ${mybatis.version}
91 |
92 |
93 |
94 | org.mybatis
95 | mybatis-spring
96 | 1.2.2
97 |
98 |
99 |
100 |
101 | javax
102 | javaee-api
103 | 7.0
104 |
105 |
106 |
107 |
108 | mysql
109 | mysql-connector-java
110 | 5.1.36
111 |
112 |
113 |
114 | commons-dbcp
115 | commons-dbcp
116 | 1.2.2
117 |
118 |
119 |
120 |
121 | jstl
122 | jstl
123 | 1.2
124 |
125 |
126 |
127 |
128 | log4j
129 | log4j
130 | ${log4j.version}
131 |
132 |
133 |
134 |
135 |
136 | com.alibaba
137 | fastjson
138 | 1.1.41
139 |
140 |
141 |
142 |
143 | org.slf4j
144 | slf4j-api
145 | ${slf4j.version}
146 |
147 |
148 |
149 | org.slf4j
150 | slf4j-log4j12
151 | ${slf4j.version}
152 |
153 |
154 |
155 |
156 | org.codehaus.jackson
157 | jackson-mapper-asl
158 | 1.9.13
159 |
160 |
161 |
162 | commons-fileupload
163 | commons-fileupload
164 | 1.3.1
165 |
166 |
167 | commons-io
168 | commons-io
169 | 2.4
170 |
171 |
172 | commons-codec
173 | commons-codec
174 | 1.9
175 |
176 |
177 |
178 |
179 |
180 | maven02
181 |
182 |
183 | org.eclipse.jetty
184 | jetty-maven-plugin
185 | 9.2.8.v20150217
186 |
187 |
188 | 80
189 |
190 | shutdown
191 | 9966
192 |
193 |
194 |
195 |
196 |
197 |
198 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst:
--------------------------------------------------------------------------------
1 | E:\Code\Java\Weixin\maven02\src\main\java\com\javen\model\User.java
2 | E:\Code\Java\Weixin\maven02\src\main\java\com\javen\dao\IUserDao.java
3 | E:\Code\Java\Weixin\maven02\src\main\java\com\javen\controller\UserController.java
4 | E:\Code\Java\Weixin\maven02\src\main\java\com\javen\service\IUserService.java
5 | E:\Code\Java\Weixin\maven02\src\main\java\com\javen\service\impl\UserServiceImpl.java
6 |
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst
--------------------------------------------------------------------------------
/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst:
--------------------------------------------------------------------------------
1 | E:\Code\Java\Weixin\maven02\src\test\java\com\javen\testmybatis\TestMyBatis.java
2 |
--------------------------------------------------------------------------------
/target/test-classes/com/javen/testmybatis/TestMyBatis.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/test-classes/com/javen/testmybatis/TestMyBatis.class
--------------------------------------------------------------------------------
/target/tmp/jsp/org/apache/jsp/WEB_002dINF/jsp/index_jsp.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Javen205/SSM/eb1facc961fa613abb4aecd755467c2364d46d24/target/tmp/jsp/org/apache/jsp/WEB_002dINF/jsp/index_jsp.class
--------------------------------------------------------------------------------
/target/tmp/jsp/org/apache/jsp/WEB_002dINF/jsp/index_jsp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Generated by the Jasper component of Apache Tomcat
3 | * Version: jetty/9.2.8.v20150217
4 | * Generated at: 2015-08-30 09:37:48 UTC
5 | * Note: The last modified time of this file was set to
6 | * the last modified time of the source file after
7 | * generation to assist with modification tracking.
8 | */
9 | package org.apache.jsp.WEB_002dINF.jsp;
10 |
11 | import javax.servlet.*;
12 | import javax.servlet.http.*;
13 | import javax.servlet.jsp.*;
14 |
15 | public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
16 | implements org.apache.jasper.runtime.JspSourceDependent {
17 |
18 | private static final javax.servlet.jsp.JspFactory _jspxFactory =
19 | javax.servlet.jsp.JspFactory.getDefaultFactory();
20 |
21 | private static java.util.Map _jspx_dependants;
22 |
23 | private javax.el.ExpressionFactory _el_expressionfactory;
24 | private org.apache.tomcat.InstanceManager _jsp_instancemanager;
25 |
26 | public java.util.Map getDependants() {
27 | return _jspx_dependants;
28 | }
29 |
30 | public void _jspInit() {
31 | _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
32 | _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
33 | }
34 |
35 | public void _jspDestroy() {
36 | }
37 |
38 | public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
39 | throws java.io.IOException, javax.servlet.ServletException {
40 |
41 | final javax.servlet.jsp.PageContext pageContext;
42 | javax.servlet.http.HttpSession session = null;
43 | final javax.servlet.ServletContext application;
44 | final javax.servlet.ServletConfig config;
45 | javax.servlet.jsp.JspWriter out = null;
46 | final java.lang.Object page = this;
47 | javax.servlet.jsp.JspWriter _jspx_out = null;
48 | javax.servlet.jsp.PageContext _jspx_page_context = null;
49 |
50 |
51 | try {
52 | response.setContentType("text/html");
53 | pageContext = _jspxFactory.getPageContext(this, request, response,
54 | null, true, 8192, true);
55 | _jspx_page_context = pageContext;
56 | application = pageContext.getServletContext();
57 | config = pageContext.getServletConfig();
58 | session = pageContext.getSession();
59 | out = pageContext.getOut();
60 | _jspx_out = out;
61 |
62 | out.write("\n");
63 | out.write("\n");
64 | out.write("Hello World!
\n");
65 | out.write("\n");
66 | out.write("\n");
67 | } catch (java.lang.Throwable t) {
68 | if (!(t instanceof javax.servlet.jsp.SkipPageException)){
69 | out = _jspx_out;
70 | if (out != null && out.getBufferSize() != 0)
71 | try {
72 | if (response.isCommitted()) {
73 | out.flush();
74 | } else {
75 | out.clearBuffer();
76 | }
77 | } catch (java.io.IOException e) {}
78 | if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
79 | else throw new ServletException(t);
80 | }
81 | } finally {
82 | _jspxFactory.releasePageContext(_jspx_page_context);
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------