├── 03.2Demo
├── .attach_pid9586
├── src
│ ├── main
│ │ ├── resources
│ │ │ └── application.properties
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── demo
│ │ │ └── Application.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── demo
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── .gitignore
└── pom.xml
├── README.md
├── 10_Estructura
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── static
│ │ │ │ └── css
│ │ │ │ │ └── styles.css
│ │ │ └── templates
│ │ │ │ └── template.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── utilidades
│ │ │ └── Utilidades.java
│ │ │ ├── entidades
│ │ │ └── UnaEntidad.java
│ │ │ ├── servicios
│ │ │ └── UnServicio.java
│ │ │ ├── seguridad
│ │ │ └── Seguridad.java
│ │ │ ├── controladores
│ │ │ └── UnControlador.java
│ │ │ ├── configuracion
│ │ │ └── Configuracion.java
│ │ │ ├── repositorios
│ │ │ └── UnRepositorio.java
│ │ │ └── Application.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 10_Estructura_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── static
│ │ │ │ └── css
│ │ │ │ │ └── styles.css
│ │ │ └── templates
│ │ │ │ └── template.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── utilidades
│ │ │ └── Utils.java
│ │ │ ├── entidades
│ │ │ └── UnaEntidad.java
│ │ │ ├── servicios
│ │ │ └── UnServicio.java
│ │ │ ├── controladores
│ │ │ └── UnControlador.java
│ │ │ ├── configuracion
│ │ │ └── MyConfig.java
│ │ │ ├── repositorios
│ │ │ └── UnRepositorio.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── ConfiguracionSeguridad.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 14_Parametros
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 12_Controladores
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── index.html
│ │ │ │ └── saludo.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 16_Formularios_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ ├── modelo
│ │ │ └── Empleado.java
│ │ │ ├── controladores
│ │ │ └── EmpleadoController.java
│ │ │ └── servicios
│ │ │ └── EmpleadoService.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 17_Formularios2_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ ├── servicios
│ │ │ └── EmpleadoService.java
│ │ │ └── controladores
│ │ │ └── EmpleadoController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 12_Controladores_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── index.html
│ │ │ │ └── saludo.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── controladores
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.properties
│ │ └── maven-wrapper.jar
└── .gitignore
├── 14_Parametros_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── templates
│ │ │ │ ├── saludo.html
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── controladores
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 16_Formularios_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ ├── servicios
│ │ │ └── EmpleadoService.java
│ │ │ └── controladores
│ │ │ └── EmpleadoController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 17_Formularios2_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── config
│ │ │ └── MyConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 18_Upload_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── Application.java
│ │ │ └── config
│ │ │ └── MyConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── .gitattributes
├── 15_ContenidoEstatico_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── static
│ │ │ │ ├── css
│ │ │ │ │ └── styles.css
│ │ │ │ └── nasa-pod.jpg
│ │ │ └── templates
│ │ │ │ └── saludo.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── controladores
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.properties
│ │ └── maven-wrapper.jar
└── .gitignore
├── 18_Upload_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── Application.java
│ │ │ └── config
│ │ │ └── MyConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── upload-dir
│ └── 4.png
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 19_Seguridad_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ └── starter-template.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── Application.java
│ │ │ └── config
│ │ │ └── MyConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 22_Entidades_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 20_Sesiones_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 22_Entidades_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 23_Repositorios_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── errors.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 15_ContenidoEstatico
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── application.properties
│ │ │ ├── static
│ │ │ │ ├── css
│ │ │ │ │ └── styles.css
│ │ │ │ ├── nasa-pod.jpg
│ │ │ │ └── index.html
│ │ │ └── templates
│ │ │ │ └── index.html
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── Application.java
│ │ │ └── MainController.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 20_Sesiones_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── errors.properties
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 24_Consultas_base
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── errors.properties
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── repositorios
│ │ │ └── EmpleadoRepository.java
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── servicios
│ │ │ ├── EmpleadoService.java
│ │ │ └── EmpleadoServiceDB.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── openwebinars.mv.db
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 19_Seguridad_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── errors.properties
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── Application.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
├── 24_Consultas_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── errors.properties
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── servicios
│ │ │ ├── EmpleadoService.java
│ │ │ └── EmpleadoServiceDB.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ ├── repositorios
│ │ │ └── EmpleadoRepository.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── openwebinars.mv.db
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
├── .gitignore
└── openwebinars.trace.db
├── 23_Repositorios_completo
├── src
│ ├── main
│ │ ├── resources
│ │ │ ├── errors.properties
│ │ │ ├── application.properties
│ │ │ └── static
│ │ │ │ └── css
│ │ │ │ ├── starter-template.css
│ │ │ │ └── signin.css
│ │ └── java
│ │ │ └── com
│ │ │ └── openwebinars
│ │ │ └── spring
│ │ │ ├── repositorios
│ │ │ └── EmpleadoRepository.java
│ │ │ ├── upload
│ │ │ └── storage
│ │ │ │ ├── StorageException.java
│ │ │ │ ├── StorageFileNotFoundException.java
│ │ │ │ ├── StorageProperties.java
│ │ │ │ └── StorageService.java
│ │ │ ├── servicios
│ │ │ ├── EmpleadoService.java
│ │ │ └── EmpleadoServiceDB.java
│ │ │ ├── config
│ │ │ ├── MvcConfig.java
│ │ │ └── MyConfig.java
│ │ │ └── seguridad
│ │ │ └── SecurityConfig.java
│ └── test
│ │ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── spring
│ │ └── ApplicationTests.java
├── openwebinars.mv.db
├── .mvn
│ └── wrapper
│ │ ├── maven-wrapper.jar
│ │ └── maven-wrapper.properties
└── .gitignore
└── SecondHandMarket_final
├── openwebinars.mv.db
├── .mvn
└── wrapper
│ ├── maven-wrapper.jar
│ └── maven-wrapper.properties
├── upload-dir
├── 1546025640261_myAvatar.png
└── 1546025694740_cocacola.png
├── src
├── main
│ ├── resources
│ │ ├── application.properties
│ │ └── static
│ │ │ └── css
│ │ │ └── styles.css
│ └── java
│ │ └── com
│ │ └── openwebinars
│ │ └── secondhandmarket
│ │ ├── upload
│ │ ├── StorageException.java
│ │ ├── StorageFileNotFoundException.java
│ │ ├── StorageProperties.java
│ │ └── StorageService.java
│ │ ├── repositorios
│ │ ├── UsuarioRepository.java
│ │ ├── CompraRepository.java
│ │ └── ProductoRepository.java
│ │ ├── configuracion
│ │ └── ConfiguracionAuditoria.java
│ │ ├── controladores
│ │ └── FilesController.java
│ │ ├── servicios
│ │ ├── UsuarioServicio.java
│ │ └── CompraServicio.java
│ │ └── seguridad
│ │ └── UserDetailsServiceImpl.java
└── test
│ └── java
│ └── com
│ └── openwebinars
│ └── secondhandmarket
│ └── SecondHandMarketApplicationTests.java
└── .gitignore
/03.2Demo/.attach_pid9586:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # curso_spring_boot_mvc
2 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/03.2Demo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
--------------------------------------------------------------------------------
/14_Parametros/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/12_Controladores/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/17_Formularios2_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
--------------------------------------------------------------------------------
/12_Controladores_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/14_Parametros_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/16_Formularios_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/18_Upload_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | logging.level.org.springframework.web=TRACE
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | spring.session.store-type=redis
4 |
5 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | spring.session.store-type=redis
4 |
5 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | spring.session.store-type=redis
4 |
5 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | spring.session.store-type=redis
4 |
5 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | # spring.mvc.static-path-pattern=/resources/**
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | font-family: arial, sans-serif;
5 | }
--------------------------------------------------------------------------------
/18_Upload_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/18_Upload_completo/upload-dir/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/18_Upload_completo/upload-dir/4.png
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/resources/errors.properties:
--------------------------------------------------------------------------------
1 |
2 | empleado.id.mayorquecero=El ID del empleado debe ser un numero entero positivo
--------------------------------------------------------------------------------
/24_Consultas_base/openwebinars.mv.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_base/openwebinars.mv.db
--------------------------------------------------------------------------------
/03.2Demo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/03.2Demo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/24_Consultas_completo/openwebinars.mv.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_completo/openwebinars.mv.db
--------------------------------------------------------------------------------
/SecondHandMarket_final/openwebinars.mv.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/SecondHandMarket_final/openwebinars.mv.db
--------------------------------------------------------------------------------
/10_Estructura/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/10_Estructura/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/14_Parametros/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/14_Parametros/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/18_Upload_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/18_Upload_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/23_Repositorios_completo/openwebinars.mv.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/23_Repositorios_completo/openwebinars.mv.db
--------------------------------------------------------------------------------
/03.2Demo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/12_Controladores/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/12_Controladores/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/20_Sesiones_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/20_Sesiones_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/10_Estructura/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/utilidades/Utilidades.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.utilidades;
2 |
3 | public class Utilidades {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/utilidades/Utils.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.utilidades;
2 |
3 | public class Utils {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/14_Parametros/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/16_Formularios_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/16_Formularios_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/18_Upload_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/18_Upload_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/18_Upload_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/19_Seguridad_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/19_Seguridad_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/22_Entidades_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/22_Entidades_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/24_Consultas_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/12_Controladores/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/15_ContenidoEstatico/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/15_ContenidoEstatico/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | color: red;
5 | font-family: 'Times New Roman', sans-serif;
6 | }
--------------------------------------------------------------------------------
/16_Formularios_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/17_Formularios2_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/17_Formularios2_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/17_Formularios2_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/18_Upload_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/19_Seguridad_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/19_Seguridad_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/20_Sesiones_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/20_Sesiones_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/20_Sesiones_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/22_Entidades_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/22_Entidades_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/22_Entidades_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/23_Repositorios_base/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/23_Repositorios_base/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/23_Repositorios_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/24_Consultas_base/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/24_Consultas_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/10_Estructura_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/10_Estructura_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/10_Estructura_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/12_Controladores_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/14_Parametros_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/14_Parametros_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/14_Parametros_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/16_Formularios_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/16_Formularios_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/16_Formularios_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/17_Formularios2_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/17_Formularios2_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/17_Formularios2_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | # logging.level.org.springframework.web=TRACE
4 | logging.level.org.springframework.security=TRACE
--------------------------------------------------------------------------------
/22_Entidades_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/23_Repositorios_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/23_Repositorios_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/24_Consultas_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/SecondHandMarket_final/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/SecondHandMarket_final/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/12_Controladores_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/12_Controladores_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
2 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
1 | server.port=9000
2 |
3 | # logging.level.org.springframework.web=TRACE
4 | logging.level.org.springframework.security=TRACE
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/resources/static/nasa-pod.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/15_ContenidoEstatico/src/main/resources/static/nasa-pod.jpg
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/.mvn/wrapper/maven-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/15_ContenidoEstatico_completo/.mvn/wrapper/maven-wrapper.jar
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/resources/application.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_base/src/main/resources/application.properties
--------------------------------------------------------------------------------
/SecondHandMarket_final/upload-dir/1546025640261_myAvatar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/SecondHandMarket_final/upload-dir/1546025640261_myAvatar.png
--------------------------------------------------------------------------------
/SecondHandMarket_final/upload-dir/1546025694740_cocacola.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/SecondHandMarket_final/upload-dir/1546025694740_cocacola.png
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/24_Consultas_completo/src/main/resources/application.properties
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/resources/application.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/SecondHandMarket_final/src/main/resources/application.properties
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/resources/application.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/23_Repositorios_completo/src/main/resources/application.properties
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/resources/static/nasa-pod.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/OpenWebinarsNet/curso_spring_boot_mvc/HEAD/15_ContenidoEstatico_completo/src/main/resources/static/nasa-pod.jpg
--------------------------------------------------------------------------------
/18_Upload_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/17_Formularios2_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/10_Estructura/src/main/resources/templates/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/16_Formularios_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/resources/static/css/starter-template.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 50px;
5 | }
6 | .starter-template {
7 | padding: 40px 15px;
8 | text-align: center;
9 | }
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/entidades/UnaEntidad.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.entidades;
2 |
3 | import javax.persistence.Entity;
4 |
5 | @Entity
6 | public class UnaEntidad {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/entidades/UnaEntidad.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.entidades;
2 |
3 | import javax.persistence.Entity;
4 |
5 | @Entity
6 | public class UnaEntidad {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/servicios/UnServicio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | @Service
6 | public class UnServicio {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/servicios/UnServicio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | @Service
6 | public class UnServicio {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/seguridad/Seguridad.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 |
5 | @Configuration
6 | public class Seguridad {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/controladores/UnControlador.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import org.springframework.stereotype.Controller;
4 |
5 | @Controller
6 | public class UnControlador {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/controladores/UnControlador.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import org.springframework.stereotype.Controller;
4 |
5 | @Controller
6 | public class UnControlador {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/resources/templates/template.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/configuracion/Configuracion.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.configuracion;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 |
5 | @Configuration
6 | public class Configuracion {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/configuracion/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.configuracion;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 |
5 | @Configuration
6 | public class MyConfig {
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/14_Parametros_completo/src/main/resources/templates/saludo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 | Hola Mundo!
9 |
10 |
--------------------------------------------------------------------------------
/12_Controladores_completo/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 | Hola Mundo!
9 |
10 |
--------------------------------------------------------------------------------
/12_Controladores_completo/src/main/resources/templates/saludo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 | Hola Mundo!
9 |
10 |
--------------------------------------------------------------------------------
/14_Parametros_completo/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 | Hola Mundo!
9 |
10 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/resources/templates/saludo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 | Hola Mundo!
9 |
10 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/resources/static/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Insert title here
6 |
7 |
8 |
9 | Hola Mundo
10 |
11 |
12 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/repositorios/UnRepositorio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.repositorios;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.openwebinars.spring.entidades.UnaEntidad;
6 |
7 | public interface UnRepositorio extends JpaRepository {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/repositorios/UnRepositorio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.repositorios;
2 |
3 | import org.springframework.data.repository.CrudRepository;
4 |
5 | import com.openwebinars.spring.entidades.UnaEntidad;
6 |
7 | public interface UnRepositorio extends CrudRepository{
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/repositorios/EmpleadoRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.repositorios;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.openwebinars.spring.modelo.Empleado;
6 |
7 | public interface EmpleadoRepository extends JpaRepository{
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/repositorios/EmpleadoRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.repositorios;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.openwebinars.spring.modelo.Empleado;
6 |
7 | public interface EmpleadoRepository extends JpaRepository{
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/03.2Demo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/10_Estructura/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/14_Parametros/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/12_Controladores/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/18_Upload_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/18_Upload_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/19_Seguridad_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/20_Sesiones_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/22_Entidades_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/24_Consultas_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/10_Estructura_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/14_Parametros_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/15_ContenidoEstatico/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/16_Formularios_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/16_Formularios_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/17_Formularios2_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/22_Entidades_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/23_Repositorios_base/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/24_Consultas_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/SecondHandMarket_final/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/12_Controladores_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/17_Formularios2_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/10_Estructura/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/14_Parametros/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /build/
22 | /nbbuild/
23 | /dist/
24 | /nbdist/
25 | /.nb-gradle/
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/upload/StorageException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.upload;
2 |
3 | public class StorageException extends RuntimeException {
4 |
5 | public StorageException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/12_Controladores/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/14_Parametros_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/16_Formularios_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/17_Formularios2_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/12_Controladores_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class Application {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(Application.class, args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import com.openwebinars.spring.modelo.Empleado;
6 |
7 | public interface EmpleadoService {
8 |
9 | public Empleado add(Empleado e);
10 | public List findAll();
11 | public Empleado findById(long id);
12 | public Empleado edit(Empleado e);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import com.openwebinars.spring.modelo.Empleado;
6 |
7 | public interface EmpleadoService {
8 |
9 | public Empleado add(Empleado e);
10 | public List findAll();
11 | public Empleado findById(long id);
12 | public Empleado edit(Empleado e);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import com.openwebinars.spring.modelo.Empleado;
6 |
7 | public interface EmpleadoService {
8 |
9 | public Empleado add(Empleado e);
10 | public List findAll();
11 | public Empleado findById(long id);
12 | public Empleado edit(Empleado e);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/repositorios/UsuarioRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.repositorios;
2 |
3 | import org.springframework.data.jpa.repository.JpaRepository;
4 |
5 | import com.openwebinars.secondhandmarket.modelo.Usuario;
6 |
7 | public interface UsuarioRepository extends JpaRepository{
8 |
9 | Usuario findFirstByEmail(String email);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/03.2Demo/src/test/java/com/openwebinars/demo/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.demo;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/10_Estructura/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/14_Parametros/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/12_Controladores/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/18_Upload_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/18_Upload_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/14_Parametros_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/16_Formularios_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/16_Formularios_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/17_Formularios2_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/12_Controladores_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/upload/StorageFileNotFoundException.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.upload;
2 |
3 | public class StorageFileNotFoundException extends StorageException {
4 |
5 | public StorageFileNotFoundException(String message) {
6 | super(message);
7 | }
8 |
9 | public StorageFileNotFoundException(String message, Throwable cause) {
10 | super(message, cause);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/test/java/com/openwebinars/spring/ApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class ApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/test/java/com/openwebinars/secondhandmarket/SecondHandMarketApplicationTests.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.springframework.boot.test.context.SpringBootTest;
6 | import org.springframework.test.context.junit4.SpringRunner;
7 |
8 | @RunWith(SpringRunner.class)
9 | @SpringBootTest
10 | public class SecondHandMarketApplicationTests {
11 |
12 | @Test
13 | public void contextLoads() {
14 | }
15 |
16 | }
17 |
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/java/com/openwebinars/spring/modelo/Empleado.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.modelo;
2 |
3 |
4 | public class Empleado {
5 |
6 | private long id;
7 | private String nombre;
8 | private String email;
9 | private String telefono;
10 |
11 | public Empleado() { }
12 |
13 | public Empleado(long id, String nombre, String email, String telefono) {
14 | this.id = id;
15 | this.nombre = nombre;
16 | this.email = email;
17 | this.telefono = telefono;
18 | }
19 |
20 |
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/10_Estructura_completo/src/main/java/com/openwebinars/spring/seguridad/ConfiguracionSeguridad.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
5 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
6 |
7 | @Configuration
8 | @EnableWebSecurity
9 | public class ConfiguracionSeguridad extends WebSecurityConfigurerAdapter{
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/repositorios/CompraRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.repositorios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 |
7 | import com.openwebinars.secondhandmarket.modelo.Compra;
8 | import com.openwebinars.secondhandmarket.modelo.Usuario;
9 |
10 | public interface CompraRepository extends JpaRepository{
11 |
12 | List findByPropietario(Usuario propietario);
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/config/MvcConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
5 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
6 |
7 | @Configuration
8 | public class MvcConfig implements WebMvcConfigurer {
9 |
10 | @Override
11 | public void addViewControllers(ViewControllerRegistry registry) {
12 | registry.addViewController("/login");
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/upload/StorageProperties.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.upload;
2 |
3 | import org.springframework.boot.context.properties.ConfigurationProperties;
4 |
5 | @ConfigurationProperties(prefix="storage")
6 | public class StorageProperties {
7 |
8 |
9 | private String location = "upload-dir";
10 |
11 | public String getLocation() {
12 | return location;
13 | }
14 |
15 | public void setLocation(String location) {
16 | this.location = location;
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/24_Consultas_completo/openwebinars.trace.db:
--------------------------------------------------------------------------------
1 | 2018-11-24 10:22:28 jdbc[3]: exception
2 | org.h2.jdbc.JdbcSQLException: Error de Sintaxis en sentencia SQL "SELECT * FROM EMPLEADO WHERE LOWER(NOMBRE) LIKE CONCAT('%',?,'%') OR LOWER(EMAIL) CONCAT[*]('%',?,'%') OR LOWER(TELEFONO) LIKE CONCAT('%',?,'%')"
3 | Syntax error in SQL statement "SELECT * FROM EMPLEADO WHERE LOWER(NOMBRE) LIKE CONCAT('%',?,'%') OR LOWER(EMAIL) CONCAT[*]('%',?,'%') OR LOWER(TELEFONO) LIKE CONCAT('%',?,'%')"; SQL statement:
4 | SELECT * FROM EMPLEADO WHERE LOWER(NOMBRE) LIKE CONCAT('%',?,'%') OR LOWER(EMAIL) CONCAT('%',?,'%') OR LOWER(TELEFONO) LIKE CONCAT('%',?,'%') [42000-197]
5 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/configuracion/ConfiguracionAuditoria.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.configuracion;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.annotation.Configuration;
5 | import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
6 |
7 | import com.openwebinars.secondhandmarket.upload.StorageProperties;
8 |
9 | @Configuration
10 | @EnableJpaAuditing
11 | @EnableConfigurationProperties(StorageProperties.class)
12 | public class ConfiguracionAuditoria {
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/03.2Demo/src/main/java/com/openwebinars/demo/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.demo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.RestController;
7 |
8 | @RestController
9 | @SpringBootApplication
10 | public class Application {
11 |
12 | @GetMapping("/")
13 | public String home() {
14 | return "¡Hola Mundo!";
15 | }
16 |
17 | public static void main(String[] args) {
18 | SpringApplication.run(Application.class, args);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/java/com/openwebinars/spring/controladores/EmpleadoController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.GetMapping;
9 | import org.springframework.web.bind.annotation.ModelAttribute;
10 | import org.springframework.web.bind.annotation.PostMapping;
11 |
12 | import com.openwebinars.spring.modelo.Empleado;
13 | import com.openwebinars.spring.servicios.EmpleadoService;
14 |
15 | @Controller
16 | public class EmpleadoController {
17 |
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/12_Controladores_completo/src/main/java/com/openwebinars/spring/controladores/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.Model;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 |
7 | @Controller
8 | public class MainController {
9 |
10 | @GetMapping("/")
11 | public String welcome(Model model) {
12 | model.addAttribute("mensaje", "¡Hola a todos los alumnos de openwebinars!");
13 | return "index";
14 | }
15 |
16 | @GetMapping("/saludo")
17 | public String saludo(Model model) {
18 | model.addAttribute("saludo", "Seguro que has visto otras plataformas con miles de cursos, pero en OpenWebinars nos centramos en IT. Como profesional tecnológico debes estar al día en las tecnologías más demandadas y OpenWebinars es la solución.");
19 | return "saludo";
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/repositorios/ProductoRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.repositorios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 |
7 | import com.openwebinars.secondhandmarket.modelo.Compra;
8 | import com.openwebinars.secondhandmarket.modelo.Producto;
9 | import com.openwebinars.secondhandmarket.modelo.Usuario;
10 |
11 | public interface ProductoRepository extends JpaRepository{
12 |
13 | List findByPropietario(Usuario propietario);
14 |
15 | List findByCompra(Compra compra);
16 |
17 | List findByCompraIsNull();
18 |
19 | List findByNombreContainsIgnoreCaseAndCompraIsNull(String nombre);
20 |
21 | List findByNombreContainsIgnoreCaseAndPropietario(String nombre, Usuario propietario);
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/12_Controladores/src/main/java/com/openwebinars/spring/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.Model;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 |
7 | @Controller
8 | public class MainController {
9 |
10 | // @GetMapping("/")
11 | // public String welcome() {
12 | // return "index";
13 | // }
14 |
15 | @GetMapping("/")
16 | public String welcome(Model model) {
17 | model.addAttribute("mensaje", "¡Hola a todos!");
18 | return "index";
19 | }
20 |
21 | @GetMapping("/saludo")
22 | public String saludoCompleto(Model model) {
23 | model.addAttribute("saludo",
24 | "Seguro que has visto otras plataformas con miles de cursos, pero en OpenWebinars nos centramos en IT. Como profesional tecnológico debes estar al día en las tecnologías más demandadas y OpenWebinars es la solución.");
25 | return "saludo";
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/14_Parametros/src/main/java/com/openwebinars/spring/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.Model;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.PathVariable;
7 | import org.springframework.web.bind.annotation.RequestParam;
8 |
9 | @Controller
10 | public class MainController {
11 |
12 | @GetMapping("/")
13 | public String welcome(@RequestParam(name="name", required=false, defaultValue="Mundo") String name, Model model) {
14 | //public String welcome(@RequestParam(name="name") Optional name, Model model) {
15 | //model.addAttribute("nombre", name.orElse("Mundo"));
16 | model.addAttribute("nombre", name);
17 | return "index";
18 | }
19 |
20 | @GetMapping("/saludo/{name}")
21 | public String saludo(@PathVariable String name, Model model) {
22 | model.addAttribute("nombre", name);
23 | return "index";
24 | }
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/java/com/openwebinars/spring/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.Model;
5 | import org.springframework.web.bind.annotation.GetMapping;
6 | import org.springframework.web.bind.annotation.PathVariable;
7 | import org.springframework.web.bind.annotation.RequestParam;
8 |
9 | @Controller
10 | public class MainController {
11 |
12 | @GetMapping("/")
13 | public String welcome(@RequestParam(name="name", required=false, defaultValue="Mundo") String name, Model model) {
14 | //public String welcome(@RequestParam(name="name") Optional name, Model model) {
15 | //model.addAttribute("nombre", name.orElse("Mundo"));
16 | model.addAttribute("nombre", name);
17 | return "index";
18 | }
19 |
20 | @GetMapping("/saludo/{name}")
21 | public String saludo(@PathVariable String name, Model model) {
22 | model.addAttribute("nombre", name);
23 | return "index";
24 | }
25 |
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/controladores/FilesController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.controladores;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.core.io.Resource;
5 | import org.springframework.http.ResponseEntity;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.ResponseBody;
10 |
11 | import com.openwebinars.secondhandmarket.upload.StorageService;
12 |
13 | @Controller
14 | public class FilesController {
15 |
16 | @Autowired
17 | StorageService storageService;
18 |
19 | @GetMapping("/files/{filename:.+}")
20 | @ResponseBody
21 | public ResponseEntity serveFile(@PathVariable String filename) {
22 | Resource file = storageService.loadAsResource(filename);
23 | return ResponseEntity.ok().body(file);
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/resources/static/css/signin.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | body {
4 | padding-top: 40px;
5 | padding-bottom: 40px;
6 | background-color: #eee;
7 | }
8 |
9 | .form-signin {
10 | max-width: 330px;
11 | padding: 15px;
12 | margin: 0 auto;
13 | }
14 | .form-signin .form-signin-heading,
15 | .form-signin .checkbox {
16 | margin-bottom: 10px;
17 | }
18 | .form-signin .checkbox {
19 | font-weight: normal;
20 | }
21 | .form-signin .form-control {
22 | position: relative;
23 | height: auto;
24 | -webkit-box-sizing: border-box;
25 | -moz-box-sizing: border-box;
26 | box-sizing: border-box;
27 | padding: 10px;
28 | font-size: 16px;
29 | }
30 | .form-signin .form-control:focus {
31 | z-index: 2;
32 | }
33 | .form-signin input[type="email"] {
34 | margin-bottom: -1px;
35 | border-bottom-right-radius: 0;
36 | border-bottom-left-radius: 0;
37 | }
38 | .form-signin input[type="password"] {
39 | margin-bottom: 10px;
40 | border-top-left-radius: 0;
41 | border-top-right-radius: 0;
42 | }
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/Application.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring;
2 |
3 | import org.springframework.boot.CommandLineRunner;
4 | import org.springframework.boot.SpringApplication;
5 | import org.springframework.boot.autoconfigure.SpringBootApplication;
6 | import org.springframework.context.annotation.Bean;
7 |
8 | import com.openwebinars.spring.upload.storage.StorageService;
9 |
10 | @SpringBootApplication
11 | public class Application {
12 |
13 | public static void main(String[] args) {
14 | SpringApplication.run(Application.class, args);
15 | }
16 |
17 | /**
18 | * Este bean se inicia al lanzar la aplicación. Nos permite inicializar el almacenamiento
19 | * secundario del proyecto
20 | *
21 | * @param storageService Almacenamiento secundario del proyecto
22 | * @return
23 | */
24 | @Bean
25 | CommandLineRunner init(StorageService storageService) {
26 | return (args) -> {
27 | storageService.deleteAll();
28 | storageService.init();
29 | };
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/servicios/UsuarioServicio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.servicios;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
5 | import org.springframework.stereotype.Service;
6 |
7 | import com.openwebinars.secondhandmarket.modelo.Usuario;
8 | import com.openwebinars.secondhandmarket.repositorios.UsuarioRepository;
9 |
10 | @Service
11 | public class UsuarioServicio {
12 |
13 | @Autowired
14 | UsuarioRepository repositorio;
15 |
16 | @Autowired
17 | BCryptPasswordEncoder passwordEncoder;
18 |
19 |
20 | public Usuario registrar(Usuario u) {
21 | u.setPassword(passwordEncoder.encode(u.getPassword()));
22 | return repositorio.save(u);
23 | }
24 |
25 | public Usuario findById(long id) {
26 | return repositorio.findById(id).orElse(null);
27 | }
28 |
29 | public Usuario buscarPorEmail(String email) {
30 | return repositorio.findFirstByEmail(email);
31 | }
32 |
33 |
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/repositorios/EmpleadoRepository.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.repositorios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.data.jpa.repository.JpaRepository;
6 | import org.springframework.data.jpa.repository.Query;
7 |
8 | import com.openwebinars.spring.modelo.Empleado;
9 |
10 | public interface EmpleadoRepository extends JpaRepository{
11 |
12 | List findByNombreContainsIgnoreCaseOrEmailContainsIgnoreCaseOrTelefonoContainsIgnoreCase(String nombre, String email, String telefono);
13 |
14 | @Query("select e from Empleado e where lower(e.nombre) like %?1% or lower(e.email) like %?1% or lower(e.telefono) like %?1%")
15 | List encuentraPorNombreEmailOTelefono(String cadena);
16 |
17 | @Query(value="SELECT * FROM EMPLEADO WHERE LOWER(NOMBRE) LIKE CONCAT('%',?1,'%') OR LOWER(EMAIL) LIKE CONCAT('%',?1,'%') OR LOWER(TELEFONO) LIKE CONCAT('%',?1,'%')", nativeQuery=true)
18 | List encuentraPorNombreEmailOTelefonoNativa(String cadena);
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/16_Formularios_base/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.List;
6 |
7 | import javax.annotation.PostConstruct;
8 |
9 | import org.springframework.stereotype.Service;
10 |
11 | import com.openwebinars.spring.modelo.Empleado;
12 |
13 | @Service
14 | public class EmpleadoService {
15 |
16 | private List repositorio = new ArrayList<>();
17 |
18 |
19 | public Empleado add(Empleado e) {
20 | repositorio.add(e);
21 | return e;
22 | }
23 |
24 | public List findAll() {
25 | return repositorio;
26 | }
27 |
28 | @PostConstruct
29 | public void init() {
30 | repositorio.addAll(
31 | Arrays.asList(new Empleado(1,"Antonio García", "antonio.garcia@openwebinars.net", "954000000"),
32 | new Empleado(2,"María López", "maria.lopez@openwebinars.net", "954000000"),
33 | new Empleado(3,"Ángel Antúnez", "angel.antunez@openwebinars.net", "954000000")
34 | )
35 | );
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/17_Formularios2_base/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.List;
6 |
7 | import javax.annotation.PostConstruct;
8 |
9 | import org.springframework.stereotype.Service;
10 |
11 | import com.openwebinars.spring.modelo.Empleado;
12 |
13 | @Service
14 | public class EmpleadoService {
15 |
16 | private List repositorio = new ArrayList<>();
17 |
18 |
19 | public Empleado add(Empleado e) {
20 | repositorio.add(e);
21 | return e;
22 | }
23 |
24 | public List findAll() {
25 | return repositorio;
26 | }
27 |
28 | @PostConstruct
29 | public void init() {
30 | repositorio.addAll(
31 | Arrays.asList(new Empleado(1,"Antonio García", "antonio.garcia@openwebinars.net", "954000000"),
32 | new Empleado(2,"María López", "maria.lopez@openwebinars.net", "954000000"),
33 | new Empleado(3,"Ángel Antúnez", "angel.antunez@openwebinars.net", "954000000")
34 | )
35 | );
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/16_Formularios_completo/src/main/java/com/openwebinars/spring/servicios/EmpleadoService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Arrays;
5 | import java.util.List;
6 |
7 | import javax.annotation.PostConstruct;
8 |
9 | import org.springframework.stereotype.Service;
10 |
11 | import com.openwebinars.spring.modelo.Empleado;
12 |
13 | @Service
14 | public class EmpleadoService {
15 |
16 | private List repositorio = new ArrayList<>();
17 |
18 |
19 | public Empleado add(Empleado e) {
20 | repositorio.add(e);
21 | return e;
22 | }
23 |
24 | public List findAll() {
25 | return repositorio;
26 | }
27 |
28 | @PostConstruct
29 | public void init() {
30 | repositorio.addAll(
31 | Arrays.asList(new Empleado(1,"Antonio García", "antonio.garcia@openwebinars.net", "954000000"),
32 | new Empleado(2,"María López", "maria.lopez@openwebinars.net", "954000000"),
33 | new Empleado(3,"Ángel Antúnez", "angel.antunez@openwebinars.net", "954000000")
34 | )
35 | );
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/17_Formularios2_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.context.MessageSource;
4 | import org.springframework.context.annotation.Bean;
5 | import org.springframework.context.annotation.Configuration;
6 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
7 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
8 |
9 | @Configuration
10 | public class MyConfig {
11 |
12 | @Bean
13 | public MessageSource messageResource() {
14 | ReloadableResourceBundleMessageSource messageSource =
15 | new ReloadableResourceBundleMessageSource();
16 |
17 | messageSource.setBasename("classpath:errors");
18 | messageSource.setDefaultEncoding("UTF-8");
19 |
20 |
21 | return messageSource;
22 | }
23 |
24 | @Bean
25 | public LocalValidatorFactoryBean getValidator() {
26 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
27 | bean.setValidationMessageSource(messageResource());
28 | return bean;
29 | }
30 |
31 |
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/servicios/EmpleadoServiceDB.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.context.annotation.Primary;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.openwebinars.spring.modelo.Empleado;
10 | import com.openwebinars.spring.repositorios.EmpleadoRepository;
11 |
12 | @Primary
13 | @Service("empleadoServiceDB")
14 | public class EmpleadoServiceDB implements EmpleadoService {
15 |
16 | @Autowired
17 | private EmpleadoRepository repositorio;
18 |
19 | @Override
20 | public Empleado add(Empleado e) {
21 | return repositorio.save(e);
22 | }
23 |
24 | @Override
25 | public List findAll() {
26 | return repositorio.findAll();
27 | }
28 |
29 | @Override
30 | public Empleado findById(long id) {
31 | return repositorio.findById(id).orElse(null);
32 | }
33 |
34 | @Override
35 | public Empleado edit(Empleado e) {
36 | return repositorio.save(e);
37 | }
38 |
39 | public void delete(Empleado e) {
40 | repositorio.delete(e);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/upload/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.upload;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.web.multipart.MultipartFile;
8 |
9 | /**
10 | * Este interfaz nos permite definir una abstracción de lo que debería
11 | * ser un almacén secundario de información, de forma que podamos usarlo
12 | * en un controlador.
13 | *
14 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
15 | * sistema de ficheros, o también podríamos implementar otro que estuviera
16 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
17 | *
18 | *
19 | * @author Equipo de desarrollo de Spring
20 | *
21 | */
22 | public interface StorageService {
23 |
24 | void init();
25 |
26 | String store(MultipartFile file);
27 |
28 | Stream loadAll();
29 |
30 | Path load(String filename);
31 |
32 | Resource loadAsResource(String filename);
33 |
34 | void delete(String filename);
35 |
36 | void deleteAll();
37 |
38 | }
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/servicios/EmpleadoServiceDB.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.context.annotation.Primary;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.openwebinars.spring.modelo.Empleado;
10 | import com.openwebinars.spring.repositorios.EmpleadoRepository;
11 |
12 | @Primary
13 | @Service("empleadoServiceDB")
14 | public class EmpleadoServiceDB implements EmpleadoService {
15 |
16 | @Autowired
17 | private EmpleadoRepository repositorio;
18 |
19 | @Override
20 | public Empleado add(Empleado e) {
21 | return repositorio.save(e);
22 | }
23 |
24 | @Override
25 | public List findAll() {
26 | return repositorio.findAll();
27 | }
28 |
29 | @Override
30 | public Empleado findById(long id) {
31 | return repositorio.findById(id).orElse(null);
32 | }
33 |
34 | @Override
35 | public Empleado edit(Empleado e) {
36 | return repositorio.save(e);
37 | }
38 |
39 | public void delete(Empleado e) {
40 | repositorio.delete(e);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/upload/storage/StorageService.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.upload.storage;
2 |
3 | import java.nio.file.Path;
4 | import java.util.stream.Stream;
5 |
6 | import org.springframework.core.io.Resource;
7 | import org.springframework.stereotype.Service;
8 | import org.springframework.web.multipart.MultipartFile;
9 |
10 | /**
11 | * Este interfaz nos permite definir una abstracción de lo que debería
12 | * ser un almacén secundario de información, de forma que podamos usarlo
13 | * en un controlador.
14 | *
15 | * De esta forma, vamos a poder utilizar un almacen que acceda a nuestro
16 | * sistema de ficheros, o también podríamos implementar otro que estuviera
17 | * en un sistema remoto, almacenar los ficheros en un sistema GridFS, ...
18 | *
19 | *
20 | * @author Equipo de desarrollo de Spring
21 | *
22 | */
23 | public interface StorageService {
24 |
25 | void init();
26 |
27 | String store(MultipartFile file, long id);
28 |
29 | Stream loadAll();
30 |
31 | Path load(String filename);
32 |
33 | Resource loadAsResource(String filename);
34 |
35 | void deleteAll();
36 |
37 | }
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/resources/static/css/styles.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /* Remove the navbar's default rounded borders and increase the bottom margin */
4 | .navbar {
5 | margin-bottom: 50px;
6 | border-radius: 0;
7 | }
8 |
9 | /* Remove the jumbotron's default bottom margin */
10 | .jumbotron {
11 | margin-bottom: 0;
12 | }
13 |
14 | /* Add a gray background color and some padding to the footer */
15 | footer {
16 | background-color: #f2f2f2;
17 | padding: 25px;
18 | }
19 |
20 | @media (min-width: 1200px) {
21 | .container {
22 | width: 90%;
23 | max-width: 90%;
24 | }
25 | }
26 |
27 | .panel-heading {
28 | font-size: 18px;
29 | font-weight: bold;
30 | }
31 |
32 | .precio {
33 | font-size: 18px;
34 | font-weight: bold;
35 | padding-top: 5px;
36 | }
37 |
38 | .panel-producto {
39 | cursor: pointer;
40 | }
41 |
42 | /* Estilos para la factura */
43 |
44 | .invoice-title h2, .invoice-title h3 {
45 | display: inline-block;
46 | }
47 |
48 | .invoice-body .table > tbody > tr > .no-line {
49 | border-top: none;
50 | }
51 |
52 | .invoice-body .table > thead > tr > .no-line {
53 | border-bottom: none;
54 | }
55 |
56 | .invoice-body .table > tbody > tr > .thick-line {
57 | border-top: 2px solid;
58 | }
--------------------------------------------------------------------------------
/18_Upload_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/18_Upload_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/19_Seguridad_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/config/MyConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.config;
2 |
3 | import org.springframework.boot.context.properties.EnableConfigurationProperties;
4 | import org.springframework.context.MessageSource;
5 | import org.springframework.context.annotation.Bean;
6 | import org.springframework.context.annotation.Configuration;
7 | import org.springframework.context.support.ReloadableResourceBundleMessageSource;
8 | import org.springframework.validation.beanvalidation.LocalValidatorFactoryBean;
9 |
10 | import com.openwebinars.spring.upload.storage.StorageProperties;
11 |
12 | @Configuration
13 | @EnableConfigurationProperties(StorageProperties.class)
14 | public class MyConfig {
15 |
16 | @Bean
17 | public MessageSource messageSource() {
18 | ReloadableResourceBundleMessageSource messageSource
19 | = new ReloadableResourceBundleMessageSource();
20 |
21 | messageSource.setBasename("classpath:errors");
22 | messageSource.setDefaultEncoding("UTF-8");
23 | return messageSource;
24 | }
25 |
26 | @Bean
27 | public LocalValidatorFactoryBean getValidator() {
28 | LocalValidatorFactoryBean bean = new LocalValidatorFactoryBean();
29 | bean.setValidationMessageSource(messageSource());
30 | return bean;
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/17_Formularios2_base/src/main/java/com/openwebinars/spring/controladores/EmpleadoController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.ui.Model;
6 | import org.springframework.web.bind.annotation.GetMapping;
7 | import org.springframework.web.bind.annotation.ModelAttribute;
8 | import org.springframework.web.bind.annotation.PostMapping;
9 |
10 | import com.openwebinars.spring.modelo.Empleado;
11 | import com.openwebinars.spring.servicios.EmpleadoService;
12 |
13 | @Controller
14 | public class EmpleadoController {
15 |
16 | @Autowired
17 | public EmpleadoService servicio;
18 |
19 | @GetMapping({ "/", "/empleado/list" })
20 | public String listado(Model model) {
21 | model.addAttribute("listaEmpleados", servicio.findAll());
22 | return "list";
23 | }
24 |
25 | @GetMapping("/empleado/new")
26 | public String nuevoEmpleadoForm(Model model) {
27 | model.addAttribute("empleadoForm", new Empleado());
28 | return "form";
29 | }
30 |
31 | @PostMapping("/empleado/new/submit")
32 | public String nuevoEmpleadoSubmit(@ModelAttribute("empleadoForm") Empleado nuevoEmpleado) {
33 | servicio.add(nuevoEmpleado);
34 | return "redirect:/empleado/list";
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/16_Formularios_completo/src/main/java/com/openwebinars/spring/controladores/EmpleadoController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.ui.Model;
8 | import org.springframework.web.bind.annotation.GetMapping;
9 | import org.springframework.web.bind.annotation.ModelAttribute;
10 | import org.springframework.web.bind.annotation.PostMapping;
11 |
12 | import com.openwebinars.spring.modelo.Empleado;
13 | import com.openwebinars.spring.servicios.EmpleadoService;
14 |
15 | @Controller
16 | public class EmpleadoController {
17 |
18 | @Autowired
19 | private EmpleadoService servicio;
20 |
21 |
22 | @GetMapping({"/", "empleado/list"})
23 | public String listado(Model model) {
24 | model.addAttribute("listaEmpleados", servicio.findAll());
25 | return "list";
26 | }
27 |
28 | @GetMapping("/empleado/new")
29 | public String nuevoEmpleadoForm(Model model) {
30 | model.addAttribute("empleadoForm", new Empleado());
31 | return "form";
32 | }
33 |
34 | @PostMapping("/empleado/new/submit")
35 | public String nuevoEmpleadoSubmit(@ModelAttribute("empleadoForm") Empleado nuevoEmpleado) {
36 | servicio.add(nuevoEmpleado);
37 | return "redirect:/empleado/list";
38 | }
39 |
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/servicios/CompraServicio.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.servicios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Service;
7 |
8 | import com.openwebinars.secondhandmarket.modelo.Compra;
9 | import com.openwebinars.secondhandmarket.modelo.Producto;
10 | import com.openwebinars.secondhandmarket.modelo.Usuario;
11 | import com.openwebinars.secondhandmarket.repositorios.CompraRepository;
12 |
13 | @Service
14 | public class CompraServicio {
15 |
16 | @Autowired
17 | CompraRepository repositorio;
18 |
19 | @Autowired
20 | ProductoServicio productoServicio;
21 |
22 | public Compra insertar(Compra c, Usuario u) {
23 | c.setPropietario(u);
24 | return repositorio.save(c);
25 | }
26 |
27 | public Compra insertar(Compra c) {
28 | return repositorio.save(c);
29 | }
30 |
31 | public Producto addProductoCompra(Producto p, Compra c) {
32 | p.setCompra(c);
33 | return productoServicio.editar(p);
34 | }
35 |
36 | public Compra buscarPorId(long id) {
37 | return repositorio.findById(id).orElse(null);
38 | }
39 |
40 | public List todas() {
41 | return repositorio.findAll();
42 | }
43 |
44 | public List porPropietario(Usuario u) {
45 | return repositorio.findByPropietario(u);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/14_Parametros_completo/src/main/java/com/openwebinars/spring/controladores/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import java.util.Optional;
4 |
5 | import org.springframework.stereotype.Controller;
6 | import org.springframework.ui.Model;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.RequestParam;
10 |
11 | @Controller
12 | public class MainController {
13 |
14 | // @GetMapping("/")
15 | // public String welcome(@RequestParam(name="name", required=false, defaultValue="Mundo") String name, Model model) {
16 | // //model.addAttribute("mensaje", "¡Hola a todos los alumnos de openwebinars!");
17 | // model.addAttribute("nombre", name);
18 | // return "index";
19 | // }
20 |
21 | @GetMapping("/")
22 | public String welcome(@RequestParam("name") Optional name, Model model) {
23 | model.addAttribute("nombre", name.orElse("Mundo"));
24 | return "index";
25 | }
26 |
27 | @GetMapping("/saludo/{name}")
28 | public String saludo(@PathVariable String name, Model model) {
29 | //model.addAttribute("saludo", "Seguro que has visto otras plataformas con miles de cursos, pero en OpenWebinars nos centramos en IT. Como profesional tecnológico debes estar al día en las tecnologías más demandadas y OpenWebinars es la solución.");
30 | model.addAttribute("saludo", "Hola " + name);
31 | return "saludo";
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/20_Sesiones_base/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/22_Entidades_base/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/19_Seguridad_completo/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/20_Sesiones_completo/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/22_Entidades_completo/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/23_Repositorios_base/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | }
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico_completo/src/main/java/com/openwebinars/spring/controladores/MainController.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.controladores;
2 |
3 | import java.util.Optional;
4 |
5 | import org.springframework.stereotype.Controller;
6 | import org.springframework.ui.Model;
7 | import org.springframework.web.bind.annotation.GetMapping;
8 | import org.springframework.web.bind.annotation.PathVariable;
9 | import org.springframework.web.bind.annotation.RequestParam;
10 |
11 | @Controller
12 | public class MainController {
13 |
14 | // @GetMapping("/")
15 | // public String welcome(@RequestParam(name="name", required=false, defaultValue="Mundo") String name, Model model) {
16 | // //model.addAttribute("mensaje", "¡Hola a todos los alumnos de openwebinars!");
17 | // model.addAttribute("nombre", name);
18 | // return "index";
19 | // }
20 |
21 | @GetMapping("/")
22 | public String welcome(@RequestParam("name") Optional name, Model model) {
23 | model.addAttribute("nombre", name.orElse("Mundo"));
24 | return "index";
25 | }
26 |
27 | @GetMapping("/saludo/{name}")
28 | public String saludo(@PathVariable String name, Model model) {
29 | //model.addAttribute("saludo", "Seguro que has visto otras plataformas con miles de cursos, pero en OpenWebinars nos centramos en IT. Como profesional tecnológico debes estar al día en las tecnologías más demandadas y OpenWebinars es la solución.");
30 | model.addAttribute("saludo", "Hola " + name);
31 | return "saludo";
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/servicios/EmpleadoServiceDB.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.servicios;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.context.annotation.Primary;
7 | import org.springframework.stereotype.Service;
8 |
9 | import com.openwebinars.spring.modelo.Empleado;
10 | import com.openwebinars.spring.repositorios.EmpleadoRepository;
11 |
12 | @Primary
13 | @Service("empleadoServiceDB")
14 | public class EmpleadoServiceDB implements EmpleadoService {
15 |
16 | @Autowired
17 | private EmpleadoRepository repositorio;
18 |
19 | @Override
20 | public Empleado add(Empleado e) {
21 | return repositorio.save(e);
22 | }
23 |
24 | @Override
25 | public List findAll() {
26 | return repositorio.findAll();
27 | }
28 |
29 | @Override
30 | public Empleado findById(long id) {
31 | return repositorio.findById(id).orElse(null);
32 | }
33 |
34 | @Override
35 | public Empleado edit(Empleado e) {
36 | return repositorio.save(e);
37 | }
38 |
39 | public void delete(Empleado e) {
40 | repositorio.delete(e);
41 | }
42 |
43 | public List buscador(String cadena) {
44 | // return repositorio.findByNombreContainsIgnoreCaseOrEmailContainsIgnoreCaseOrTelefonoContainsIgnoreCase(cadena, cadena, cadena);
45 | //return repositorio.encuentraPorNombreEmailOTelefono(cadena.toLowerCase());
46 | return repositorio.encuentraPorNombreEmailOTelefonoNativa(cadena.toLowerCase());
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/24_Consultas_base/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**", "/h2-console/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | http.csrf().disable();
38 | http.headers().frameOptions().disable();
39 |
40 | }
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/24_Consultas_completo/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**", "/h2-console/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | http.csrf().disable();
38 | http.headers().frameOptions().disable();
39 |
40 | }
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/23_Repositorios_completo/src/main/java/com/openwebinars/spring/seguridad/SecurityConfig.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.spring.seguridad;
2 |
3 | import org.springframework.context.annotation.Configuration;
4 | import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
5 | import org.springframework.security.config.annotation.web.builders.HttpSecurity;
6 | import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
7 | import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
8 | import org.springframework.security.crypto.password.NoOpPasswordEncoder;
9 |
10 | @Configuration
11 | @EnableWebSecurity
12 | public class SecurityConfig extends WebSecurityConfigurerAdapter {
13 |
14 | @Override
15 | protected void configure(AuthenticationManagerBuilder auth) throws Exception {
16 | auth
17 | .inMemoryAuthentication()
18 | .passwordEncoder(NoOpPasswordEncoder.getInstance())
19 | .withUser("admin")
20 | .password("admin")
21 | .roles("ADMIN");
22 | }
23 |
24 | @Override
25 | protected void configure(HttpSecurity http) throws Exception {
26 | http
27 | .authorizeRequests()
28 | .antMatchers("/webjars/**", "/css/**", "/h2-console/**").permitAll()
29 | .anyRequest().authenticated()
30 | .and()
31 | .formLogin()
32 | .loginPage("/login")
33 | .permitAll()
34 | .and()
35 | .logout();
36 |
37 | http.csrf().disable();
38 | http.headers().frameOptions().disable();
39 |
40 | }
41 |
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/SecondHandMarket_final/src/main/java/com/openwebinars/secondhandmarket/seguridad/UserDetailsServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.openwebinars.secondhandmarket.seguridad;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.security.core.authority.SimpleGrantedAuthority;
5 | import org.springframework.security.core.userdetails.User;
6 | import org.springframework.security.core.userdetails.User.UserBuilder;
7 | import org.springframework.security.core.userdetails.UserDetails;
8 | import org.springframework.security.core.userdetails.UserDetailsService;
9 | import org.springframework.security.core.userdetails.UsernameNotFoundException;
10 | import org.springframework.stereotype.Service;
11 |
12 | import com.openwebinars.secondhandmarket.modelo.Usuario;
13 | import com.openwebinars.secondhandmarket.repositorios.UsuarioRepository;
14 |
15 |
16 | @Service("userDetailsService")
17 | public class UserDetailsServiceImpl implements UserDetailsService {
18 |
19 | @Autowired
20 | UsuarioRepository repositorio;
21 |
22 | @Override
23 | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
24 | Usuario usuario = repositorio.findFirstByEmail(username);
25 |
26 | UserBuilder builder = null;
27 |
28 | if (usuario != null) {
29 | builder = User.withUsername(username);
30 | builder.disabled(false);
31 | builder.password(usuario.getPassword());
32 | builder.authorities(new SimpleGrantedAuthority("ROLE_USER"));
33 | } else {
34 | throw new UsernameNotFoundException("Usuario no encontrado");
35 | }
36 |
37 | return builder.build();
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/03.2Demo/pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 |
7 | com.openwebinars
8 | 03.2Demo
9 | 0.0.1-SNAPSHOT
10 | jar
11 |
12 | 03.2Demo
13 | Demo project for Spring Boot
14 |
15 |
16 | org.springframework.boot
17 | spring-boot-starter-parent
18 | 2.1.0.RELEASE
19 |
20 |
21 |
22 |
23 | UTF-8
24 | UTF-8
25 | 1.8
26 |
27 |
28 |
29 |
30 | org.springframework.boot
31 | spring-boot-starter-web
32 |
33 |
34 | org.springframework.boot
35 | spring-boot-starter-test
36 | test
37 |
38 |
39 |
40 |
41 |
42 |
43 | org.springframework.boot
44 | spring-boot-maven-plugin
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/12_Controladores/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Bootstrap 101 Template
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
23 | Mensaje
24 |
25 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/12_Controladores/src/main/resources/templates/saludo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Bootstrap 101 Template
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
23 | Mensaje
24 |
25 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/14_Parametros/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Bootstrap 101 Template
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
23 | Hola mundo
24 |
25 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/15_ContenidoEstatico/src/main/resources/templates/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Bootstrap 101 Template
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
20 |
21 |
23 | Hola mundo
24 |
25 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------