Skip to content

Commit 16b4b8d

Browse files
committed
Updated to Spring 4.3 & Spring Boot 1.4
1 parent ab23054 commit 16b4b8d

File tree

23 files changed

+44
-46
lines changed

23 files changed

+44
-46
lines changed

web_ejem1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem3/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem4/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem5/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem6/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem6/src/main/java/es/urjc/code/daw/SesionController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
import org.springframework.stereotype.Controller;
66
import org.springframework.ui.Model;
7-
import org.springframework.web.bind.annotation.RequestMapping;
8-
import org.springframework.web.bind.annotation.RequestMethod;
7+
import org.springframework.web.bind.annotation.GetMapping;
8+
import org.springframework.web.bind.annotation.PostMapping;
99
import org.springframework.web.bind.annotation.RequestParam;
1010

1111
@Controller
1212
public class SesionController {
1313

1414
private String infoCompartida;
1515

16-
@RequestMapping(value = "/procesarFormulario", method = RequestMethod.POST)
16+
@PostMapping(value = "/procesarFormulario")
1717
public String procesarFormulario(@RequestParam String info, HttpSession sesion) {
1818

1919
sesion.setAttribute("infoUsuario", info);
@@ -22,7 +22,7 @@ public String procesarFormulario(@RequestParam String info, HttpSession sesion)
2222
return "resultado_formulario";
2323
}
2424

25-
@RequestMapping("/mostrarDatos")
25+
@GetMapping("/mostrarDatos")
2626
public String mostrarDatos(Model model, HttpSession sesion) {
2727

2828
String infoUsuario = (String) sesion.getAttribute("infoUsuario");

web_ejem7/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>org.springframework.boot</groupId>
1313
<artifactId>spring-boot-starter-parent</artifactId>
14-
<version>1.3.3.RELEASE</version>
14+
<version>1.4.1.RELEASE</version>
1515
<relativePath/>
1616
</parent>
1717

web_ejem7/src/main/java/es/urjc/code/daw/SesionController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import org.springframework.beans.factory.annotation.Autowired;
44
import org.springframework.stereotype.Controller;
55
import org.springframework.ui.Model;
6-
import org.springframework.web.bind.annotation.RequestMapping;
7-
import org.springframework.web.bind.annotation.RequestMethod;
6+
import org.springframework.web.bind.annotation.GetMapping;
7+
import org.springframework.web.bind.annotation.PostMapping;
88
import org.springframework.web.bind.annotation.RequestParam;
99

1010
@Controller
@@ -15,7 +15,7 @@ public class SesionController {
1515

1616
private String infoCompartida;
1717

18-
@RequestMapping(value = "/procesarFormulario", method = RequestMethod.POST)
18+
@PostMapping(value = "/procesarFormulario")
1919
public String procesarFormulario(@RequestParam String info) {
2020

2121
usuario.setInfo(info);
@@ -24,7 +24,7 @@ public String procesarFormulario(@RequestParam String info) {
2424
return "resultado_formulario";
2525
}
2626

27-
@RequestMapping("/mostrarDatos")
27+
@GetMapping("/mostrarDatos")
2828
public String mostrarDatos(Model model) {
2929

3030
String infoUsuario = usuario.getInfo();

web_ejem7/src/main/java/es/urjc/code/daw/Usuario.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
package es.urjc.code.daw;
22

3-
import org.springframework.context.annotation.Scope;
4-
import org.springframework.context.annotation.ScopedProxyMode;
53
import org.springframework.stereotype.Component;
6-
import org.springframework.web.context.WebApplicationContext;
4+
import org.springframework.web.context.annotation.SessionScope;
75

86
@Component
9-
@Scope(value = WebApplicationContext.SCOPE_SESSION, proxyMode = ScopedProxyMode.TARGET_CLASS)
7+
@SessionScope
108
public class Usuario {
119

1210
private String info;

0 commit comments

Comments
 (0)