Skip to content

Commit 3b3bea3

Browse files
committed
web app
1 parent 81de8a7 commit 3b3bea3

File tree

17 files changed

+592
-8
lines changed

17 files changed

+592
-8
lines changed

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
/sample/target/
2-
/spring-capgemini-core/target/
1+
/sample/target/
2+
/spring-capgemini-core/target/
3+
/spring-capgemini-web/target/

pom.xml

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<module>sample</module>
1010
<module>spring-capgemini-core</module>
1111
<module>spring-aspect</module>
12-
</modules>
12+
<module>spring-capgemini-web</module>
13+
</modules>
1314
<properties>
1415
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1516
<spring.version>4.0.8.RELEASE</spring.version>
@@ -101,4 +102,4 @@
101102
</dependencies>
102103
</dependencyManagement>
103104

104-
</project>
105+
</project>

spring-aspect/src/main/resources/spring-context.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
<aop:config>
2222
<!-- <aop:aspect ref="aspect">
2323
<aop:before method="interceptBefore" pointcut="bean(targetBean)" />
24-
</aop:aspect>-->
24+
</aop:aspect>
2525
<aop:aspect ref="interceptor">
2626
<aop:around method="intercept" pointcut="bean(targetBean)"/>
27-
</aop:aspect>
27+
</aop:aspect>-->
2828

29-
<!--aop:aspect ref="interceptor">
29+
<aop:aspect ref="interceptor">
3030
<aop:around method="intercept" pointcut="execution (public * pl.com.softproject.springtestaltkom.springaspect.TargetBean.method2 (..))"/>
31-
</aop:aspect-->
31+
</aop:aspect>
3232

3333
</aop:config>
3434

spring-capgemini-web/pom.xml

+222
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,222 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<artifactId>spring-capgemini</artifactId>
6+
<groupId>pl.altkom.spring</groupId>
7+
<version>1.0-SNAPSHOT</version>
8+
</parent>
9+
10+
<groupId>pl.altkom.spring</groupId>
11+
<artifactId>spring-capgemini-web</artifactId>
12+
<version>1.0-SNAPSHOT</version>
13+
<packaging>war</packaging>
14+
15+
<name>Spring MVC SpringData WEB Application</name>
16+
<url>http://www.softproject.com.pl</url>
17+
18+
<properties>
19+
<spring.version>3.2.2.RELEASE</spring.version>
20+
<spring.security.version>3.1.4.RELEASE</spring.security.version>
21+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
22+
</properties>
23+
24+
<dependencies>
25+
26+
<!-- poniższa zależnośc powoduje problemy z uruchamianiem testów jenostokwych, ponieważ dostarcza tylko interfejsów bez implementacji -->
27+
28+
<!-- <dependency>
29+
<groupId>javax</groupId>
30+
<artifactId>javaee-api</artifactId>
31+
<version>6.0</version>
32+
<scope>provided</scope>
33+
</dependency>-->
34+
35+
<dependency>
36+
<groupId>log4j</groupId>
37+
<artifactId>log4j</artifactId>
38+
<version>1.2.14</version>
39+
</dependency>
40+
41+
<dependency>
42+
<groupId>junit</groupId>
43+
<artifactId>junit</artifactId>
44+
<version>4.11</version>
45+
<scope>test</scope>
46+
</dependency>
47+
48+
<dependency>
49+
<groupId>org.springframework.security</groupId>
50+
<artifactId>spring-security-config</artifactId>
51+
<version>${spring.security.version}</version>
52+
</dependency>
53+
54+
<dependency>
55+
<groupId>org.springframework.security</groupId>
56+
<artifactId>spring-security-taglibs</artifactId>
57+
<version>${spring.security.version}</version>
58+
</dependency>
59+
60+
<dependency>
61+
<groupId>org.springframework.security</groupId>
62+
<artifactId>spring-security-web</artifactId>
63+
<version>${spring.security.version}</version>
64+
</dependency>
65+
66+
<dependency>
67+
<artifactId>spring-security-core</artifactId>
68+
<groupId>org.springframework.security</groupId>
69+
<version>${spring.security.version}</version>
70+
</dependency>
71+
72+
<!-- Spring do Spring Security -->
73+
74+
<dependency>
75+
<artifactId>spring-aop</artifactId>
76+
<groupId>org.springframework</groupId>
77+
<type>jar</type>
78+
<version>${spring.version}</version>
79+
</dependency>
80+
<dependency>
81+
<artifactId>spring-beans</artifactId>
82+
<groupId>org.springframework</groupId>
83+
<type>jar</type>
84+
<version>${spring.version}</version>
85+
</dependency>
86+
<dependency>
87+
<artifactId>spring-expression</artifactId>
88+
<groupId>org.springframework</groupId>
89+
<type>jar</type>
90+
<version>${spring.version}</version>
91+
</dependency>
92+
<dependency>
93+
<artifactId>spring-jdbc</artifactId>
94+
<groupId>org.springframework</groupId>
95+
<type>jar</type>
96+
<version>${spring.version}</version>
97+
</dependency>
98+
<dependency>
99+
<artifactId>spring-tx</artifactId>
100+
<groupId>org.springframework</groupId>
101+
<type>jar</type>
102+
<version>${spring.version}</version>
103+
</dependency>
104+
<dependency>
105+
<artifactId>spring-web</artifactId>
106+
<groupId>org.springframework</groupId>
107+
<type>jar</type>
108+
<version>${spring.version}</version>
109+
</dependency>
110+
111+
<!-- reszta zależności Spring-->
112+
113+
<dependency>
114+
<groupId>org.springframework</groupId>
115+
<artifactId>spring-core</artifactId>
116+
<version>${spring.version}</version>
117+
</dependency>
118+
119+
<dependency>
120+
<groupId>org.springframework</groupId>
121+
<artifactId>spring-context</artifactId>
122+
<version>${spring.version}</version>
123+
</dependency>
124+
125+
<dependency>
126+
<groupId>org.springframework</groupId>
127+
<artifactId>spring-test</artifactId>
128+
<version>${spring.version}</version>
129+
<scope>test</scope>
130+
</dependency>
131+
132+
<dependency>
133+
<groupId>org.springframework</groupId>
134+
<artifactId>spring-webmvc</artifactId>
135+
<version>${spring.version}</version>
136+
<type>jar</type>
137+
</dependency>
138+
139+
<dependency>
140+
<groupId>commons-dbcp</groupId>
141+
<artifactId>commons-dbcp</artifactId>
142+
<version>1.4</version>
143+
</dependency>
144+
145+
<!-- JPA i SpringData-->
146+
147+
<dependency>
148+
<groupId>org.springframework</groupId>
149+
<artifactId>spring-context-support</artifactId>
150+
<version>${spring.version}</version>
151+
</dependency>
152+
153+
<dependency>
154+
<groupId>org.springframework</groupId>
155+
<artifactId>spring-orm</artifactId>
156+
<version>${spring.version}</version>
157+
</dependency>
158+
159+
<dependency>
160+
<groupId>org.hibernate.javax.persistence</groupId>
161+
<artifactId>hibernate-jpa-2.0-api</artifactId>
162+
<version>1.0.1.Final</version>
163+
</dependency>
164+
165+
<dependency>
166+
<groupId>org.hibernate</groupId>
167+
<artifactId>hibernate-entitymanager</artifactId>
168+
<version>4.1.9.Final</version>
169+
<scope>runtime</scope>
170+
</dependency>
171+
172+
<!--dependency>
173+
<groupId>org.apache.derby</groupId>
174+
<artifactId>derbyclient</artifactId>
175+
<version>10.6.2.1</version>
176+
<scope>runtime</scope>
177+
</dependency-->
178+
179+
<dependency>
180+
<groupId>org.slf4j</groupId>
181+
<artifactId>slf4j-log4j12</artifactId>
182+
<version>1.7.2</version>
183+
</dependency>
184+
185+
<!-- Spring Data -->
186+
187+
<dependency>
188+
<groupId>org.springframework.data</groupId>
189+
<artifactId>spring-data-jpa</artifactId>
190+
<version>1.3.0.RELEASE</version>
191+
</dependency>
192+
193+
<!-- <dependency>
194+
<groupId>org.springframework</groupId>
195+
<artifactId>spring-aop</artifactId>
196+
<version>${spring.version}</version>
197+
</dependency>-->
198+
199+
<!-- Tagliby -->
200+
201+
<dependency>
202+
<groupId>taglibs</groupId>
203+
<artifactId>standard</artifactId>
204+
<version>1.1.2</version>
205+
</dependency>
206+
207+
<dependency>
208+
<groupId>jstl</groupId>
209+
<artifactId>jstl</artifactId>
210+
<version>1.1.2</version>
211+
</dependency>
212+
213+
<!-- Hibernate Validator -->
214+
215+
<dependency>
216+
<groupId>org.hibernate</groupId>
217+
<artifactId>hibernate-validator</artifactId>
218+
<version>5.0.3.Final</version>
219+
</dependency>
220+
221+
</dependencies>
222+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
2+
log4j.appender.stdout.Target=System.out
3+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
4+
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
5+
6+
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
7+
log4j.appender.file.File=${catalina.base}/logs/spring-capgemini-web.log
8+
log4j.appender.file.DatePattern='.'yyyy-MM-dd
9+
log4j.appender.file.layout=org.apache.log4j.PatternLayout
10+
log4j.appender.file.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
11+
12+
13+
log4j.rootLogger=WARN, file
14+
log4j.logger.pl.com.softproject=DEBUG
15+
log4j.logger.org.springframework=INFO
16+
log4j.logger.org.hibernate=INFO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
2+
log4j.appender.stdout.Target=System.out
3+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
4+
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
5+
6+
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
7+
log4j.appender.file.File=${catalina.base}/logs/spring-capgemini-web.log
8+
log4j.appender.file.DatePattern='.'yyyy-MM-dd
9+
log4j.appender.file.layout=org.apache.log4j.PatternLayout
10+
log4j.appender.file.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
11+
12+
13+
log4j.rootLogger=WARN, file
14+
log4j.logger.pl.com.softproject=DEBUG
15+
log4j.logger.org.springframework=INFO
16+
log4j.logger.org.hibernate=INFO
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2011-08-31 the original author or authors.
3+
*/
4+
package pl.altkom.spring.capgemini.web.controller;
5+
6+
import org.apache.log4j.Logger;
7+
import org.springframework.stereotype.Controller;
8+
import org.springframework.web.bind.annotation.RequestMapping;
9+
import org.springframework.web.servlet.ModelAndView;
10+
11+
/**
12+
*
13+
* @author Adrian Lapierre <[email protected]>
14+
*/
15+
@Controller
16+
public class MyController {
17+
18+
protected Logger logger = Logger.getLogger(getClass());
19+
20+
@RequestMapping("/home")
21+
public ModelAndView home() {
22+
23+
logger.debug("MyController.home()");
24+
25+
return new ModelAndView("home");
26+
}
27+
28+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
2+
log4j.appender.stdout.Target=System.out
3+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
4+
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
5+
6+
log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
7+
log4j.appender.file.File=${catalina.base}/logs/spring-capgemini-web.log
8+
log4j.appender.file.DatePattern='.'yyyy-MM-dd
9+
log4j.appender.file.layout=org.apache.log4j.PatternLayout
10+
log4j.appender.file.layout.ConversionPattern=%d %5p %c{1}:%L - %m%n
11+
12+
13+
log4j.rootLogger=INFO, stdout
14+
log4j.logger.pl.com.softproject=DEBUG
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright 2013-03-01 the original author or authors.
2+
3+
name=${project.name}
4+
version=${project.version}
5+
buildtime=${timestamp}
6+
revision=${buildNumber}

0 commit comments

Comments
 (0)