Permalink
Browse files

renamed base package

  • Loading branch information...
1 parent 1f21f56 commit 21a0a6f051d44aeea2fc16d778ac31589ad1a509 @markfisher markfisher committed Jun 2, 2011
View
@@ -2,16 +2,14 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.springframework</groupId>
- <artifactId>data</artifactId>
+ <groupId>org.cloudfoundry.samples</groupId>
+ <artifactId>hello-spring-mysql</artifactId>
<name>hello-spring-mysql</name>
<packaging>war</packaging>
<version>1.0.0-BUILD-SNAPSHOT</version>
<properties>
<java-version>1.6</java-version>
<org.springframework-version>3.0.5.RELEASE</org.springframework-version>
- <org.springframework.roo-version>1.0.2.RELEASE</org.springframework.roo-version>
- <org.aspectj-version>1.6.11.RELEASE</org.aspectj-version>
<org.slf4j-version>1.6.1</org.slf4j-version>
</properties>
<dependencies>
@@ -43,13 +41,6 @@
<artifactId>spring-webmvc</artifactId>
<version>${org.springframework-version}</version>
</dependency>
-
- <!-- AspectJ -->
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${org.aspectj-version}</version>
- </dependency>
<!-- Logging -->
<dependency>
@@ -230,46 +221,11 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>aspectj-maven-plugin</artifactId>
- <!-- Have to use version 1.2 since version 1.3 does not appear to work with ITDs -->
- <version>1.2</version>
- <dependencies>
- <!-- You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>${org.aspectj-version}</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjtools</artifactId>
- <version>${org.aspectj-version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- <goal>test-compile</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <outxml>true</outxml>
- <source>${java-version}</source>
- <target>${java-version}</target>
- </configuration>
- </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<junitArtifactName>junit:junit</junitArtifactName>
- <excludes>
- <exclude>**/*_Roo_*</exclude>
- </excludes>
</configuration>
</plugin>
<plugin>
@@ -1,9 +1,10 @@
-package org.springframework.data;
+package org.cloudfoundry.samples;
import javax.inject.Inject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@@ -21,7 +22,8 @@
private ReferenceDataRepository referenceRepository;
/**
- * Simply selects the home view to render by returning its name.
+ * Prepares the Model with some metadata and the list of States retrieved
+ * from the DB. Then, selects the home view to render by returning its name.
*/
@RequestMapping(value="/", method=RequestMethod.GET)
public String home(Model model) {
@@ -30,6 +32,5 @@ public String home(Model model) {
model.addAttribute("states", referenceRepository.findAll());
return "home";
}
-
-}
+}
@@ -1,4 +1,4 @@
-package org.springframework.data;
+package org.cloudfoundry.samples;
import java.sql.ResultSet;
import java.sql.SQLException;
@@ -1,4 +1,4 @@
-package org.springframework.data;
+package org.cloudfoundry.samples;
public class State {
@@ -11,7 +11,7 @@
</appender>
<!-- Application Loggers -->
- <logger name="org.springframework.data">
+ <logger name="org.cloudfoundry.samples">
<level value="info" />
</logger>
@@ -8,6 +8,6 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- Scans within the base package of the application for @Components to configure as beans -->
- <context:component-scan base-package="org.springframework.data" />
+ <context:component-scan base-package="org.cloudfoundry.samples" />
</beans>
@@ -14,6 +14,7 @@
<property name="username" value="spring" />
<property name="password" value="spring" />
</bean>
+
<jdbc:initialize-database data-source="dataSource">
<jdbc:script location="classpath:db-schema.sql"/>
</jdbc:initialize-database>
@@ -2,25 +2,24 @@
<%@ page session="false" %>
<html>
<head>
- <title>Home</title>
+ <title>Hello Spring MySQL</title>
</head>
<body>
-<h1>
- Hello world!
-</h1>
-<h4>Database Info:</h4>
- DataSource: <c:out value="${dbinfo}"/></br>
-<h4>Current States:</h4>
-<c:if test="${not empty states}">
- <p>
- <c:forEach var="state" items="${states}">
- <c:out value="${state}"/></br>
- </c:forEach>
- </p>
-</c:if>
-<c:if test="${empty states}">
- <p>No States found</p>
-</c:if>
+ <h1>Hello Spring MySQL!</h1>
+ <h4>Database Info:</h4>
+ DataSource: <c:out value="${dbinfo}"/></br>
+
+ <h4>Current States:</h4>
+ <c:if test="${not empty states}">
+ <p>
+ <c:forEach var="state" items="${states}">
+ <c:out value="${state}"/></br>
+ </c:forEach>
+ </p>
+ </c:if>
+ <c:if test="${empty states}">
+ <p>No States found</p>
+ </c:if>
</body>
</html>
@@ -11,7 +11,7 @@
</appender>
<!-- Application Loggers -->
- <logger name="org.springframework.data">
+ <logger name="org.cloudfoundry.samples">
<level value="info" />
</logger>

0 comments on commit 21a0a6f

Please sign in to comment.