Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
# Compiled class file
*.class
# Maven
target/
*.jar
*.war
*.ear
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties

# Log file
*.log
# IntelliJ IDEA
.idea/
*.iws
*.iml
*.ipr

# BlueJ files
*.ctxt
# VS Code
.vscode/

# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Eclipse
.classpath
.project
.settings/
bin/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# Mac
.DS_Store
.AppleDouble
.LSOverride

# Logs
*.log
logs/

# Docker
.dockerignore

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
# Spring Boot
spring-shell.log
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM eclipse-temurin:17-jdk AS builder

WORKDIR /app

COPY pom.xml .
COPY src ./src

RUN apt-get update && apt-get install -y maven && mvn clean package -DskipTests

FROM eclipse-temurin:17-jre

WORKDIR /app

COPY --from=builder /app/target/*.jar app.jar

EXPOSE 8040

ENTRYPOINT ["java", "-jar", "app.jar"]
80 changes: 80 additions & 0 deletions Empleados.postman_collection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"info": {
"_postman_id": "935f6379-1ad6-4aa5-a5ce-d36a400f1a11",
"name": "Employee",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "52888531",
"_collection_link": "https://go.postman.co/collection/52888531-935f6379-1ad6-4aa5-a5ce-d36a400f1a11?source=collection_link"
},
"item": [
{
"name": "Create",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"nombre\": \"Juan\",\n \"apellido\": \"Pérez\",\n \"rut\": \"11111111-1\",\n \"cargo\": \"Desarrollador\",\n \"salario\": 500000,\n \"bono\": 30000,\n \"descuentos\":400000\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "localhost:8040/api/empleados/",
"host": [
"localhost"
],
"port": "8040",
"path": [
"api",
"empleados",
""
]
}
},
"response": []
},
{
"name": "List",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "localhost:8040/api/empleados/",
"host": [
"localhost"
],
"port": "8040",
"path": [
"api",
"empleados",
""
]
}
},
"response": []
},
{
"name": "delete",
"request": {
"method": "DELETE",
"header": [],
"url": {
"raw": "localhost:8040/api/empleados/1",
"host": [
"localhost"
],
"port": "8040",
"path": [
"api",
"empleados",
"1"
]
}
},
"response": []
}
]
}
27 changes: 27 additions & 0 deletions HELP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Getting Started

### Reference Documentation
For further reference, please consider the following sections:

* [Official Apache Maven documentation](https://maven.apache.org/guides/index.html)
* [Spring Boot Maven Plugin Reference Guide](https://docs.spring.io/spring-boot/3.5.13/maven-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.5.13/maven-plugin/build-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.5.13/reference/web/servlet.html)
* [JDBC API](https://docs.spring.io/spring-boot/3.5.13/reference/data/sql.html)

### Guides
The following guides illustrate how to use some features concretely:

* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
* [Accessing Relational Data using JDBC with Spring](https://spring.io/guides/gs/relational-data-access/)
* [Managing Transactions](https://spring.io/guides/gs/managing-transactions/)

### Maven Parent overrides

Due to Maven's design, elements are inherited from the parent POM to the project POM.
While most of the inheritance is fine, it also inherits unwanted elements like `<license>` and `<developers>` from the parent.
To prevent this, the project POM contains empty overrides for these elements.
If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.

Loading