mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
more comments
This commit is contained in:
parent
2c8f0351b1
commit
cf9a540e94
7 changed files with 166 additions and 407 deletions
208
pom.xml
208
pom.xml
|
@ -11,21 +11,10 @@
|
|||
|
||||
<properties>
|
||||
<antlr.version>2.7.7</antlr.version>
|
||||
<asm.version>3.3.1</asm.version>
|
||||
<aspectj.version>1.7.1</aspectj.version>
|
||||
<commons-beanutils.version>1.8.3</commons-beanutils.version>
|
||||
<commons-cli.version>1.2</commons-cli.version>
|
||||
<commons-codec.version>1.7</commons-codec.version>
|
||||
<commons-collections.version>3.2.1</commons-collections.version>
|
||||
<commons-dbcp.version>1.4</commons-dbcp.version>
|
||||
<commons-digester2.version>2.1</commons-digester2.version>
|
||||
<commons-digester3.version>3.2</commons-digester3.version>
|
||||
<commons-exec.version>1.1</commons-exec.version>
|
||||
<commons-fileupload.version>1.2.2</commons-fileupload.version>
|
||||
<commons-io.version>2.4</commons-io.version>
|
||||
<commons-lang2.version>2.6</commons-lang2.version>
|
||||
<commons-lang3.version>3.1</commons-lang3.version>
|
||||
<commons-net.version>3.1</commons-net.version>
|
||||
<commons-pool.version>1.6</commons-pool.version>
|
||||
<ehcache.version>2.6.3</ehcache.version>
|
||||
<hamcrest.version>1.3</hamcrest.version>
|
||||
|
@ -36,8 +25,8 @@
|
|||
<jadira-usertype-core.version>3.1.0.CR1</jadira-usertype-core.version>
|
||||
<javassist.version>3.17.1-GA</javassist.version>
|
||||
<java.version>1.6</java.version>
|
||||
<jaxb-api.version>2.2.7</jaxb-api.version>
|
||||
<javax-el.version>2.2</javax-el.version>
|
||||
<jaxb-api.version>2.2.7</jaxb-api.version>
|
||||
<jaxb-impl.version>2.2.7-b53</jaxb-impl.version>
|
||||
<jboss-logging.version>3.1.2.GA</jboss-logging.version>
|
||||
<jdom.version>2.0.2</jdom.version>
|
||||
|
@ -84,7 +73,6 @@
|
|||
<webjars-jquery.version>1.9.0</webjars-jquery.version>
|
||||
</properties>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<!-- Spring -->
|
||||
<dependency>
|
||||
|
@ -142,15 +130,13 @@
|
|||
<artifactId>hsqldb</artifactId>
|
||||
</dependency>
|
||||
<!-- MySQL JDBC Connector -->
|
||||
<!--
|
||||
<!-- gDickens: standard mysql library
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql.version}</version>
|
||||
</dependency>
|
||||
-->
|
||||
<!-- Hibernate -->
|
||||
<!-- JPA -->
|
||||
<!-- Hibernate JPA Provider -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
|
@ -160,6 +146,10 @@
|
|||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-core</artifactId>
|
||||
</dependency>
|
||||
<!-- **********************************************************************
|
||||
** SPRING DATA **
|
||||
********************************************************************** -->
|
||||
|
@ -200,6 +190,7 @@
|
|||
<artifactId>jaxb-impl</artifactId>
|
||||
</dependency>
|
||||
<!-- Test dependencies -->
|
||||
<!-- gDickens: Using JUnit 4.11 for cleaner Hamcrest support -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
|
@ -228,23 +219,27 @@
|
|||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time-hibernate</artifactId>
|
||||
</dependency>
|
||||
<!-- used for Spring MVC Test framework -->
|
||||
<!-- Do not use hamcrest-all, hamcrest-library
|
||||
(hamcrest-core in dep mgmt, is used by junit) -->
|
||||
<!-- gDickens: used for Spring MVC Test framework
|
||||
* Do not use hamcrest-all, hamcrest-library
|
||||
* (hamcrest-core in dep mgmt, is used by junit) -->
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-library</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- Best Practice to ALWAYS include the Maven plugin versions -->
|
||||
<!-- gDickens: Best Practice to ALWAYS include the Maven plugin versions -->
|
||||
<build>
|
||||
<defaultGoal>install</defaultGoal>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>${maven-compiler-plugin.version}</version>
|
||||
<configuration>
|
||||
<compilerArguments>
|
||||
<Xlint/>
|
||||
</compilerArguments>
|
||||
<verbose>true</verbose>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
|
@ -269,6 +264,7 @@
|
|||
<warName>petclinic</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- gDickens: Include the Builders and Natures -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-eclipse-plugin</artifactId>
|
||||
|
@ -280,6 +276,19 @@
|
|||
<sourceIncludes>
|
||||
<sourceInclude>**/*.*</sourceInclude>
|
||||
</sourceIncludes>
|
||||
<additionalBuildcommands>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
</buildCommand>
|
||||
</additionalBuildcommands>
|
||||
<additionalProjectnatures>
|
||||
<projectnature>org.eclipse.jdt.core.javanature</projectnature>
|
||||
<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
|
||||
<projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>
|
||||
</additionalProjectnatures>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
|
@ -352,9 +361,6 @@
|
|||
-->
|
||||
<stopPort>9966</stopPort>
|
||||
<stopKey>shutterdown</stopKey>
|
||||
<requestLog implementation="ch.qos.logback.access.jetty.RequestLogImpl">
|
||||
<fileName>./src/main/resources/logback-access.xml</fileName>
|
||||
</requestLog>
|
||||
<systemProperties>
|
||||
<systemProperty>
|
||||
<name>logback.configurationFile</name>
|
||||
|
@ -403,16 +409,10 @@
|
|||
<version>${logback.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-access</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
<!-- *******************************************************
|
||||
For reliable builds, ensure:
|
||||
gDickens: For reliable builds, ensure:
|
||||
* NO duplicate jars of differing versions
|
||||
* NO old versions of logging and Spring are included directly or Transitively
|
||||
* All plugins have the version included as per Maven
|
||||
|
@ -463,10 +463,54 @@
|
|||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
|
||||
<!-- gDickens: For Eclipse's M2E plugin support -->
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<versionRange>[1.0.0,)</versionRange>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute/>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<versionRange>[2.4,)</versionRange>
|
||||
<goals>
|
||||
<goal>unpack</goal>
|
||||
<goal>sources</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<execute/>
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
|
||||
<!-- Best Practice: Specify the transitive dependency versions, to ensure that older versions
|
||||
<!-- gDickens: Best Practice: Specify the transitive dependency versions, to ensure that older versions
|
||||
of projects are NOT included.
|
||||
|
||||
This is particularly important to Spring projects where projects such as Spring-Data, may
|
||||
|
@ -521,12 +565,6 @@
|
|||
<artifactId>hibernate-ehcache</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jadira.usertype</groupId>
|
||||
<artifactId>usertype.core</artifactId>
|
||||
<version>${jadira-usertype-core.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-core</artifactId>
|
||||
|
@ -538,6 +576,11 @@
|
|||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jadira.usertype</groupId>
|
||||
<artifactId>usertype.core</artifactId>
|
||||
<version>${jadira-usertype-core.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
|
@ -611,11 +654,6 @@
|
|||
<artifactId>spring-expression</artifactId>
|
||||
<version>${spring-framework.version}</version>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.springframework</groupId>-->
|
||||
<!--<artifactId>spring-instrument</artifactId>-->
|
||||
<!--<version>${spring.version}</version>-->
|
||||
<!--</dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
|
@ -687,68 +725,11 @@
|
|||
<artifactId>commons-dbcp</artifactId>
|
||||
<version>${commons-dbcp.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>${commons-lang2.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-exec</artifactId>
|
||||
<version>${commons-exec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
<version>${commons-collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>${commons-codec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>${commons-net.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>${commons-fileupload.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-digester3</artifactId>
|
||||
<version>${commons-digester3.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-digester</groupId>
|
||||
<artifactId>commons-digester</artifactId>
|
||||
<version>${commons-digester2.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-logging</groupId>
|
||||
<artifactId>commons-logging</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-beanutils</groupId>
|
||||
<artifactId>commons-beanutils</artifactId>
|
||||
|
@ -765,17 +746,7 @@
|
|||
<artifactId>commons-pool</artifactId>
|
||||
<version>${commons-pool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>${commons-cli.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging with SLF4J & LogBack -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -812,16 +783,6 @@
|
|||
<artifactId>rome</artifactId>
|
||||
<version>${rome.version}</version>
|
||||
</dependency>
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>javax.activation</groupId>-->
|
||||
<!--<artifactId>activation</artifactId>-->
|
||||
<!--<version>${activation.version}</version>-->
|
||||
<!--</dependency>-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>org.jasypt</groupId>-->
|
||||
<!--<artifactId>jasypt</artifactId>-->
|
||||
<!--<version>${jasypt.version}</version>-->
|
||||
<!--</dependency>-->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
|
@ -842,12 +803,6 @@
|
|||
<artifactId>antlr</artifactId>
|
||||
<version>${antlr.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>asm</groupId>
|
||||
<artifactId>asm</artifactId>
|
||||
<version>${asm.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- Databases -->
|
||||
<dependency>
|
||||
|
@ -930,4 +885,5 @@
|
|||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
</project>
|
|
@ -1,166 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<!-- Authors: Chris Taylor, Ceki Gulcu. -->
|
||||
|
||||
<!-- Version: 1.2 -->
|
||||
|
||||
<!-- A configuration element consists of optional renderer
|
||||
elements,appender elements, categories and an optional root
|
||||
element. -->
|
||||
|
||||
<!ELEMENT log4j:configuration (renderer*, appender*,(category|logger)*,root?,
|
||||
categoryFactory?)>
|
||||
|
||||
<!-- The "threshold" attribute takes a level value such that all -->
|
||||
<!-- logging statements with a level equal or below this value are -->
|
||||
<!-- disabled. -->
|
||||
|
||||
<!-- Setting the "debug" enable the printing of internal log4j logging -->
|
||||
<!-- statements. -->
|
||||
|
||||
<!-- By default, debug attribute is "null", meaning that we not do touch -->
|
||||
<!-- internal log4j logging settings. The "null" value for the threshold -->
|
||||
<!-- attribute can be misleading. The threshold field of a repository -->
|
||||
<!-- cannot be set to null. The "null" value for the threshold attribute -->
|
||||
<!-- simply means don't touch the threshold field, the threshold field -->
|
||||
<!-- keeps its old value. -->
|
||||
|
||||
<!ATTLIST log4j:configuration
|
||||
xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
|
||||
threshold (all|debug|info|warn|error|fatal|off|null) "null"
|
||||
debug (true|false|null) "null"
|
||||
>
|
||||
|
||||
<!-- renderer elements allow the user to customize the conversion of -->
|
||||
<!-- message objects to String. -->
|
||||
|
||||
<!ELEMENT renderer EMPTY>
|
||||
<!ATTLIST renderer
|
||||
renderedClass CDATA #REQUIRED
|
||||
renderingClass CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!-- Appenders must have a name and a class. -->
|
||||
<!-- Appenders may contain an error handler, a layout, optional parameters -->
|
||||
<!-- and filters. They may also reference (or include) other appenders. -->
|
||||
<!ELEMENT appender (errorHandler?, param*, layout?, filter*, appender-ref*)>
|
||||
<!ATTLIST appender
|
||||
name ID #REQUIRED
|
||||
class CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT layout (param*)>
|
||||
<!ATTLIST layout
|
||||
class CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT filter (param*)>
|
||||
<!ATTLIST filter
|
||||
class CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!-- ErrorHandlers can be of any class. They can admit any number of -->
|
||||
<!-- parameters. -->
|
||||
|
||||
<!ELEMENT errorHandler (param*, root-ref?, logger-ref*, appender-ref?)>
|
||||
<!ATTLIST errorHandler
|
||||
class CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT root-ref EMPTY>
|
||||
|
||||
<!ELEMENT logger-ref EMPTY>
|
||||
<!ATTLIST logger-ref
|
||||
ref IDREF #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT param EMPTY>
|
||||
<!ATTLIST param
|
||||
name CDATA #REQUIRED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
|
||||
<!-- The priority class is org.apache.log4j.Level by default -->
|
||||
<!ELEMENT priority (param*)>
|
||||
<!ATTLIST priority
|
||||
class CDATA #IMPLIED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!-- The level class is org.apache.log4j.Level by default -->
|
||||
<!ELEMENT level (param*)>
|
||||
<!ATTLIST level
|
||||
class CDATA #IMPLIED
|
||||
value CDATA #REQUIRED
|
||||
>
|
||||
|
||||
|
||||
<!-- If no level element is specified, then the configurator MUST not -->
|
||||
<!-- touch the level of the named category. -->
|
||||
<!ELEMENT category (param*,(priority|level)?,appender-ref*)>
|
||||
<!ATTLIST category
|
||||
class CDATA #IMPLIED
|
||||
name CDATA #REQUIRED
|
||||
additivity (true|false) "true"
|
||||
>
|
||||
|
||||
<!-- If no level element is specified, then the configurator MUST not -->
|
||||
<!-- touch the level of the named logger. -->
|
||||
<!ELEMENT logger (level?,appender-ref*)>
|
||||
<!ATTLIST logger
|
||||
name ID #REQUIRED
|
||||
additivity (true|false) "true"
|
||||
>
|
||||
|
||||
|
||||
<!ELEMENT categoryFactory (param*)>
|
||||
<!ATTLIST categoryFactory
|
||||
class CDATA #REQUIRED>
|
||||
|
||||
<!ELEMENT appender-ref EMPTY>
|
||||
<!ATTLIST appender-ref
|
||||
ref IDREF #REQUIRED
|
||||
>
|
||||
|
||||
<!-- If no priority element is specified, then the configurator MUST not -->
|
||||
<!-- touch the priority of root. -->
|
||||
<!-- The root category always exists and cannot be subclassed. -->
|
||||
<!ELEMENT root (param*, (priority|level)?, appender-ref*)>
|
||||
|
||||
|
||||
<!-- ==================================================================== -->
|
||||
<!-- A logging event -->
|
||||
<!-- ==================================================================== -->
|
||||
<!ELEMENT log4j:eventSet (log4j:event*)>
|
||||
<!ATTLIST log4j:eventSet
|
||||
xmlns:log4j CDATA #FIXED "http://jakarta.apache.org/log4j/"
|
||||
version (1.1|1.2) "1.2"
|
||||
includesLocationInfo (true|false) "true"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<!ELEMENT log4j:event (log4j:message, log4j:NDC?, log4j:throwable?,
|
||||
log4j:locationInfo?) >
|
||||
|
||||
<!-- The timestamp format is application dependent. -->
|
||||
<!ATTLIST log4j:event
|
||||
logger CDATA #REQUIRED
|
||||
level CDATA #REQUIRED
|
||||
thread CDATA #REQUIRED
|
||||
timestamp CDATA #REQUIRED
|
||||
>
|
||||
|
||||
<!ELEMENT log4j:message (#PCDATA)>
|
||||
<!ELEMENT log4j:NDC (#PCDATA)>
|
||||
|
||||
<!ELEMENT log4j:throwable (#PCDATA)>
|
||||
|
||||
<!ELEMENT log4j:locationInfo EMPTY>
|
||||
<!ATTLIST log4j:locationInfo
|
||||
class CDATA #REQUIRED
|
||||
method CDATA #REQUIRED
|
||||
file CDATA #REQUIRED
|
||||
line CDATA #REQUIRED
|
||||
>
|
|
@ -1,25 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
|
||||
|
||||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
|
||||
|
||||
<!-- Appenders -->
|
||||
<appender name="console" class="org.apache.log4j.ConsoleAppender">
|
||||
<param name="Target" value="System.out" />
|
||||
<layout class="org.apache.log4j.PatternLayout">
|
||||
<param name="ConversionPattern" value="%-5p: %c - %m%n" />
|
||||
</layout>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework.test.web">
|
||||
<level value="trace" />
|
||||
</logger>
|
||||
|
||||
<!-- Root Logger -->
|
||||
<root>
|
||||
<priority value="info" /><!--
|
||||
<level value="info"></level>
|
||||
--><appender-ref ref="console" />
|
||||
</root>
|
||||
|
||||
</log4j:configuration>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.coreFileAppender">
|
||||
<file>${user.dir}/logs/petclinic-access.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<fileNamePattern>${user.dir}/logs/petclinic-access.%d{yyyy-MM-dd}.log.zip</fileNamePattern>
|
||||
</rollingPolicy>
|
||||
|
||||
<encoder>
|
||||
<pattern>combined</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%n%fullRequest%n%fullResponse%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
</configuration>
|
||||
|
||||
|
|
@ -14,11 +14,7 @@
|
|||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="accounts" level="debug" />
|
||||
<logger name="rewards" level="debug" />
|
||||
<logger name="org.springframework.beans" level="trace" />
|
||||
<logger name="org.springframework.web.servlet" level="trace" />
|
||||
<logger name="org.springframework.core.env" level="trace" />
|
||||
<logger name="org.springframework.samples.petclinic" level="debug"/>
|
||||
|
||||
<root level="warn">
|
||||
<appender-ref ref="console"/>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
xmlns="http://java.sun.com/xml/ns/javaee"
|
||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
||||
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
||||
id="WebApp_ID" version="2.5">
|
||||
|
||||
<display-name>Spring PetClinic</display-name>
|
||||
|
|
23
src/test/resources/logback-test.xml
Normal file
23
src/test/resources/logback-test.xml
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="true" scan="true" scanPeriod="30 seconds">
|
||||
|
||||
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
|
||||
<resetJUL>true</resetJUL>
|
||||
</contextListener>
|
||||
|
||||
<!-- To enable JMX Management -->
|
||||
<jmxConfigurator/>
|
||||
|
||||
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%-5level %logger{0} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.springframework.samples.petclinic" level="debug"/>
|
||||
<logger name="org.springframework.test.web" level="trace"/>
|
||||
|
||||
<root level="warn">
|
||||
<appender-ref ref="console"/>
|
||||
</root>
|
||||
</configuration>
|
Loading…
Reference in a new issue