Skip to content

Commit

Permalink
Add files
Browse files Browse the repository at this point in the history
  • Loading branch information
danielfeitopin committed Dec 26, 2023
1 parent 3a7ec65 commit e929c55
Show file tree
Hide file tree
Showing 92 changed files with 6,853 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.log
target/
work/
.idea/
database/
log/
90 changes: 90 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# MUNICS SAPP Práctica 1

<div align="center">

***Seguridad de Aplicaciones: Práctica 1 - Store App***

[![OpenJDK_17](https://img.shields.io/badge/OpenJDK_17-black?logo=openjdk&logoColor=white&labelColor=grey&color=orange)](<https://openjdk.org/>)
[![Spring](https://img.shields.io/badge/Spring-black?logo=spring&logoColor=white&labelColor=grey&color=%236DB33F)](<https://spring.io/>)
[![Spring Boot](https://img.shields.io/badge/Spring_Boot-black?logo=springboot&logoColor=white&labelColor=grey&color=%236DB33F)](<https://spring.io/>)
[![Hibernate](https://img.shields.io/badge/Hibernate-black?logo=hibernate&logoColor=white&labelColor=grey&color=%2359666C)
](<https://hibernate.org/>)
[![Thymeleaf](https://img.shields.io/badge/Thymeleaf-black?logo=thymeleaf&logoColor=white&labelColor=grey&color=%23005F0F)](<https://www.thymeleaf.org/>)
[![jQuery](https://img.shields.io/badge/jQuery-black?logo=jquery&logoColor=white&labelColor=grey&color=%230769AD)](<https://jquery.com/>)
[![bootstrap](https://img.shields.io/badge/bootstrap-black?logo=bootstrap&logoColor=white&labelColor=grey&color=%237952B3)](<https://getbootstrap.com/>)
[![Static Badge](https://img.shields.io/badge/Maven-black?logo=apachemaven&logoColor=white&labelColor=grey&color=%23C71A36)](<https://maven.apache.org/>)

[![License: MIT](<https://img.shields.io/github/license/danielfeitopin/MUNICS-SAPP-P1>)](LICENSE "License")
[![GitHub issues](https://img.shields.io/github/issues/danielfeitopin/MUNICS-SAPP-P1)](<https://github.com/danielfeitopin/MUNICS-SAPP-P1> "Issues")
[![GitHub stars](https://img.shields.io/github/stars/danielfeitopin/MUNICS-SAPP-P1)](<https://github.com/danielfeitopin/MUNICS-SAPP-P1/stargazers> "Stars")

</div>

## Índice

- [MUNICS SAPP Práctica 1](#munics-sapp-práctica-1)
- [Índice](#índice)
- [Configuración](#configuración)
- [Software requerido](#software-requerido)
- [Uso](#uso)
- [Compilación y ejecución de la aplicación web](#compilación-y-ejecución-de-la-aplicación-web)
- [Estructura del proyecto](#estructura-del-proyecto)
- [Licencia](#licencia)
- [Contacto](#contacto)


## Configuración

### Software requerido

- [AdoptOpenJDK 17](<https://adoptium.net/>)
- [Maven](<https://maven.apache.org/download.cgi>)

## Uso

### Compilación y ejecución de la aplicación web

Compilación:

```sh
mvn sql:execute install
```

Ejecución:

```sh
mvn spring-boot:run
```

Restauración de la base de datos:

```sh
mvn sql:execute
```

Acceso: <http://localhost:8888/>

## Estructura del proyecto

La aplicación web se distribuye dentro de un proyecto Maven:
- `pom.xml`: fichero de configuración del proyecto.
- `src/main/java`: directorio de código fuente.
- `src/main/resources`: ficheros de configuración.
- `src/main/resources/templates`: plantillas HTML.
- `src/main/resources/static`: recursos estáticos.
- `src/main/resources/application.properties`: ichero principal de configuración de la aplicación.

## Licencia

El contenido de este repositorio está bajo la licencia [GPL3](LICENSE).

## Contacto

¡No dudes en ponerte en contacto conmigo!

<div align="center">

[![GitHub](https://img.shields.io/badge/GitHub-%23181717?style=for-the-badge&logo=github&logoColor=%23181717&color=white)](<https://github.com/danielfeitopin>)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-white?style=for-the-badge&logo=linkedin&logoColor=white&color=%230A66C2)](<https://www.linkedin.com/in/danielfeitopin/>)

</div>
Binary file added docs/enunciado.pdf
Binary file not shown.
Binary file added docs/memoria.pdf
Binary file not shown.
258 changes: 258 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>es.storeapp</groupId>
<artifactId>store-app</artifactId>
<version>1.0.0</version>
<name>Store Application</name>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.0</version>
</parent>

<dependencies>

<!-- Java -->

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
</dependency>
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.21</version>
</dependency>

<!-- Web -->

<dependency>
<groupId>org.webjars</groupId>
<artifactId>webjars-locator</artifactId>
<version>0.33</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>4.0.0-2</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>3.3.1-1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>font-awesome</artifactId>
<version>5.0.6</version>
</dependency>
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>jquery-form-validator</artifactId>
<version>2.3.77</version>
<exclusions>
<exclusion>
<groupId>org.webjars.bower</groupId>
<artifactId>jquery</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>datatables</artifactId>
<version>1.13.2</version>
</dependency>
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>datatables-responsive</artifactId>
<version>2.2.1</version>
<exclusions>
<exclusion>
<groupId>org.webjars.bower</groupId>
<artifactId>jquery</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bower</groupId>
<artifactId>datatables</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.webjars.bower</groupId>
<artifactId>bootstrap-star-rating</artifactId>
<version>4.0.3</version>
<exclusions>
<exclusion>
<groupId>org.webjars.bower</groupId>
<artifactId>jquery</artifactId>
</exclusion>
<exclusion>
<groupId>org.webjars.bower</groupId>
<artifactId>bootstrap</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery.inputmask</artifactId>
<version>3.3.7</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.27.0-GA</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.0.Final</version>
</dependency>
<dependency>
<groupId>org.owasp.encoder</groupId>
<artifactId>encoder</artifactId>
<version>1.2.3</version>
</dependency>
</dependencies>

<properties>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>es.storeapp.Application</start-class>
</properties>

<build>
<plugins>

<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.5.1</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>

<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.0.2155</version>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<finalName>store-app</finalName>
<descriptors>
<descriptor>src/main/assembly/src.xml</descriptor>
</descriptors>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sql-maven-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.16.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbytools</artifactId>
<version>10.16.1.1</version>
</dependency>
</dependencies>
<configuration>
<driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
<url>jdbc:derby:database;create=true</url>
<username>app</username>
<password>secr3t</password>
<autocommit>true</autocommit>
<onError>continue</onError>
<srcFiles>
<srcFile>src/main/resources/tables.sql</srcFile>
<srcFile>src/main/resources/data.sql</srcFile>
</srcFiles>
</configuration>
</plugin>

</plugins>
</build>

</project>
Binary file added server.p12
Binary file not shown.
Loading

0 comments on commit e929c55

Please sign in to comment.