Skip to content

Commit 0abd3e8

Browse files
committed
Upgrade to Spring Boot 2.0.0.RC2
* Upgrades to Spring Boot 2.0.0.RC2, Spring Cloud Finchley.M7, and Spring Cloud Stream Elmhurst.RC1 * Biggest change was disabling CSRF on the Eureka server, given Eureka clients don't transmit. * Smaller bugs that existed in Ch. 10 were fixed ensuring it runs smoothly.
1 parent 7a0f43c commit 0abd3e8

File tree

60 files changed

+164
-191
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+164
-191
lines changed

1/part1/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// tag::buildscript[]
22
buildscript {
33
ext {
4-
springBootVersion = '2.0.0.RC1'
4+
springBootVersion = '2.0.0.RC2'
55
}
66
repositories {
77
mavenCentral()

10/part1/chat/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// tag::propdeps-plugin-1[]
22
buildscript {
33
ext {
4-
springBootVersion = '2.0.0.RC1'
5-
springCloudVersion = 'Finchley.M6'
6-
springCloudStreamVersion = 'Elmhurst.M4'
4+
springBootVersion = '2.0.0.RC2'
5+
springCloudVersion = 'Finchley.M7'
6+
springCloudStreamVersion = 'Elmhurst.RC1'
77
}
88
repositories {
99
mavenCentral()

10/part1/chat/src/main/java/com/greglturnquist/learningspringboot/chat/ChatController.java

Lines changed: 0 additions & 66 deletions
This file was deleted.

10/part1/chat/src/main/resources/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1>Learning Spring Boot - 2nd Edition</h1>
2222
<br/>
2323
<textarea id="chatDisplay"
2424
rows="10" cols="80"
25-
disabled="true" />
25+
disabled="true" ></textarea>
2626
<br/>
2727
<input id="chatInput" type="text"
2828
style="width: 500px" value="" />

10/part1/comments/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.0.RC1'
4-
springCloudVersion = 'Finchley.M6'
5-
springCloudStreamVersion = 'Elmhurst.M4'
3+
springBootVersion = '2.0.0.RC2'
4+
springCloudVersion = 'Finchley.M7'
5+
springCloudStreamVersion = 'Elmhurst.RC1'
66
}
77
repositories {
88
mavenCentral()

10/part1/config-server/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.0.RC1'
4-
springCloudVersion = 'Finchley.M6'
3+
springBootVersion = '2.0.0.RC2'
4+
springCloudVersion = 'Finchley.M7'
55
}
66
repositories {
77
mavenCentral()

10/part1/eureka-server/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.0.RC1'
4-
springCloudVersion = 'Finchley.M6'
3+
springBootVersion = '2.0.0.RC2'
4+
springCloudVersion = 'Finchley.M7'
55
}
66
repositories {
77
mavenCentral()

10/part1/eureka-server/src/main/java/com/greglturnquist/learningspringboot/LearningSpringBootEurekaServerApplication.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
import org.springframework.boot.autoconfigure.SpringBootApplication;
2020
import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer;
2121
import org.springframework.context.annotation.Bean;
22+
import org.springframework.context.annotation.Configuration;
23+
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
24+
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
2225
import org.springframework.security.core.userdetails.User;
2326
import org.springframework.security.core.userdetails.UserDetailsService;
2427
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
@@ -44,5 +47,20 @@ UserDetailsService userDetailsService() {
4447
.password("password")
4548
.roles("USER").build());
4649
}
50+
51+
@Configuration
52+
protected static class SecurityPolicy extends WebSecurityConfigurerAdapter {
53+
54+
@Override
55+
protected void configure(HttpSecurity http) throws Exception {
56+
http
57+
.authorizeRequests()
58+
.anyRequest().authenticated()
59+
.and()
60+
.httpBasic()
61+
.and()
62+
.csrf().disable();
63+
}
64+
}
4765
}
4866
// end::code[]

10/part1/hystrix-dashboard/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.0.RC1'
4-
springCloudVersion = 'Finchley.M6'
3+
springBootVersion = '2.0.0.RC2'
4+
springCloudVersion = 'Finchley.M7'
55
}
66
repositories {
77
mavenCentral()

10/part1/images/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
buildscript {
22
ext {
3-
springBootVersion = '2.0.0.RC1'
4-
springCloudVersion = 'Finchley.M6'
5-
springCloudStreamVersion = 'Elmhurst.M4'
3+
springBootVersion = '2.0.0.RC2'
4+
springCloudVersion = 'Finchley.M7'
5+
springCloudStreamVersion = 'Elmhurst.RC1'
66
}
77
repositories {
88
mavenCentral()

0 commit comments

Comments
 (0)