Browse Source

Updates for round 10

* upgrade Spring Boot version
* upgrade Tomcat version
* Use HikariCP
Brian Clozel 11 years ago
parent
commit
2b80d46d3f

+ 4 - 4
spring/README.md

@@ -61,8 +61,8 @@ Check out [SampleApplication, the main Application file](src/main/java/com/teche
 ## Infrastructure Software Versions
 ## Infrastructure Software Versions
 The tests were run with:
 The tests were run with:
 
 
-* [Spring 4.0.2.RELEASE](http://projects.spring.io/spring-framework/)
-* [Spring Boot 1.0.0.RC4](http://projects.spring.io/spring-boot/)
-* [Spring Data JPA 1.5.0.RELEASE](http://projects.spring.io/spring-data-jpa/)
+* [Spring 4.0.5.RELEASE](http://projects.spring.io/spring-framework/)
+* [Spring Boot 1.1.3.RELEASE](http://projects.spring.io/spring-boot/)
+* [Spring Data JPA 1.6.0.RELEASE](http://projects.spring.io/spring-data-jpa/)
 * [Java OpenJDK 1.7.0_09](http://openjdk.java.net/)
 * [Java OpenJDK 1.7.0_09](http://openjdk.java.net/)
-* [Tomcat 8.0.3](https://tomcat.apache.org/)
+* [Tomcat 8.0.8](https://tomcat.apache.org/)

+ 12 - 18
spring/pom.xml

@@ -8,7 +8,7 @@
     <parent>
     <parent>
         <groupId>org.springframework.boot</groupId>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
         <artifactId>spring-boot-starter-parent</artifactId>
-        <version>1.0.0.RC4</version>
+        <version>1.1.3.RELEASE</version>
     </parent>
     </parent>
 
 
     <groupId>com.techempower</groupId>
     <groupId>com.techempower</groupId>
@@ -19,7 +19,7 @@
 
 
     <properties>
     <properties>
         <java.version>1.7</java.version>
         <java.version>1.7</java.version>
-        <tomcat.version>8.0.3</tomcat.version>
+        <tomcat.version>8.0.9</tomcat.version>
     </properties>
     </properties>
 
 
     <dependencies>
     <dependencies>
@@ -32,9 +32,19 @@
             <groupId>mysql</groupId>
             <groupId>mysql</groupId>
             <artifactId>mysql-connector-java</artifactId>
             <artifactId>mysql-connector-java</artifactId>
         </dependency>
         </dependency>
+        <dependency>
+            <groupId>com.zaxxer</groupId>
+            <artifactId>HikariCP</artifactId>
+        </dependency>
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-data-jpa</artifactId>
             <artifactId>spring-boot-starter-data-jpa</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>org.apache.tomcat</groupId>
+					<artifactId>tomcat-jdbc</artifactId>
+				</exclusion>
+			</exclusions>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <groupId>org.springframework.boot</groupId>
@@ -43,16 +53,11 @@
         <dependency>
         <dependency>
         	<groupId>org.springframework.boot</groupId>
         	<groupId>org.springframework.boot</groupId>
         	<artifactId>spring-boot-starter-tomcat</artifactId>
         	<artifactId>spring-boot-starter-tomcat</artifactId>
-        	<scope>provided</scope>
         </dependency>
         </dependency>
         <dependency>
         <dependency>
             <groupId>org.thymeleaf</groupId>
             <groupId>org.thymeleaf</groupId>
             <artifactId>thymeleaf-spring4</artifactId>
             <artifactId>thymeleaf-spring4</artifactId>
         </dependency>
         </dependency>
-        <dependency>
-            <groupId>org.yaml</groupId>
-            <artifactId>snakeyaml</artifactId>
-        </dependency>
     </dependencies>
     </dependencies>
 
 
     <build>
     <build>
@@ -66,10 +71,6 @@
     </build>
     </build>
 
 
     <repositories>
     <repositories>
-        <repository>
-            <id>spring-milestones</id>
-            <url>http://repo.spring.io/milestone</url>
-        </repository>
         <repository>
         <repository>
             <id>bintray</id>
             <id>bintray</id>
             <name>bintray</name>
             <name>bintray</name>
@@ -77,11 +78,4 @@
         </repository>
         </repository>
     </repositories>
     </repositories>
 
 
-    <pluginRepositories>
-        <pluginRepository>
-            <id>spring-milestones</id>
-            <url>http://repo.spring.io/milestone</url>
-        </pluginRepository>
-    </pluginRepositories>
-
 </project>
 </project>

+ 1 - 1
spring/src/main/java/com/techempower/spring/web/FortuneController.java

@@ -19,7 +19,7 @@ final class FortuneController {
     private FortuneRepository fortuneRepository;
     private FortuneRepository fortuneRepository;
 
 
     @RequestMapping(value = "/fortunes")
     @RequestMapping(value = "/fortunes")
-     String fortunes(ModelMap modelMap) {
+    String fortunes(ModelMap modelMap) {
         List<Fortune> fortunes = this.fortuneRepository.findAll();
         List<Fortune> fortunes = this.fortuneRepository.findAll();
         fortunes.add(new Fortune(0, "Additional fortune added at request time."));
         fortunes.add(new Fortune(0, "Additional fortune added at request time."));
         Collections.sort(fortunes);
         Collections.sort(fortunes);

+ 1 - 1
spring/src/main/java/com/techempower/spring/web/WorldDatabaseController.java

@@ -58,7 +58,7 @@ final class WorldDatabaseController {
 		return worlds;
 		return worlds;
 	}
 	}
 
 
-	private Integer boundQueryCount(Integer raw) {
+	private Integer boundQueryCount(final Integer raw) {
 		if (raw == null || raw < 1) {
 		if (raw == null || raw < 1) {
 			return 1;
 			return 1;
 		} else if (raw > 500) {
 		} else if (raw > 500) {

+ 0 - 2
spring/src/main/resources/application.yml

@@ -6,8 +6,6 @@ spring:
     url: jdbc:mysql://${database.host:localhost}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
     url: jdbc:mysql://${database.host:localhost}:3306/hello_world?jdbcCompliantTruncation=false&elideSetAutoCommits=true&useLocalSessionState=true&cachePrepStmts=true&cacheCallableStmts=true&alwaysSendSetIsolation=false&prepStmtCacheSize=4096&cacheServerConfiguration=true&prepStmtCacheSqlLimit=2048&zeroDateTimeBehavior=convertToNull&traceProtocol=false&useUnbufferedInput=false&useReadAheadInput=false&maintainTimeStats=false&useServerPrepStmts&cacheRSMetadata=true
     username: benchmarkdbuser
     username: benchmarkdbuser
     password: benchmarkdbpass
     password: benchmarkdbpass
-    maxActive: 256
-    maxIdle: 256    
   jpa:
   jpa:
     show_sql: false
     show_sql: false
     hibernate:
     hibernate:

+ 0 - 4
spring/src/main/resources/schema.sql → spring/src/main/resources/import.sql

@@ -1,7 +1,3 @@
-
-
--- Uncomment the following lines to import sample data
-
 -- Fortunes
 -- Fortunes
 insert into Fortune(message) values ('43rd Law of Computing: Anything that can go wr fortune: Segmentation violation -- Core dumped');
 insert into Fortune(message) values ('43rd Law of Computing: Anything that can go wr fortune: Segmentation violation -- Core dumped');
 insert into Fortune(message) values ('The proof of the pudding is in the eating. -- Miguel de Cervantes');
 insert into Fortune(message) values ('The proof of the pudding is in the eating. -- Miguel de Cervantes');