mirror of
https://git.imnavajas.es/jjimenez/printhub.git
synced 2026-01-12 08:28:48 +00:00
modificado para crear tasks que recompilen todo
This commit is contained in:
2
.env
2
.env
@ -3,6 +3,6 @@ MYSQL_DATABASE=printhub
|
||||
MYSQL_ROOT_PASSWORD=8FOc7XQrUWEtwgiDKppfcv2LWo
|
||||
|
||||
# Spring Boot datasource
|
||||
SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/miappdb?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
|
||||
SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/printhub?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC
|
||||
SPRING_DATASOURCE_USERNAME=printhub
|
||||
SPRING_DATASOURCE_PASSWORD=DsomyTF4NjTtwzGTTWaxoUEvIt
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@ -29,5 +29,6 @@ build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
# Maven cache
|
||||
/m2/
|
||||
|
||||
|
||||
17
.vscode/launch.json
vendored
Normal file
17
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Depurar Spring Boot en Docker",
|
||||
"request": "attach",
|
||||
"hostName": "localhost",
|
||||
"port": 5005,
|
||||
"preLaunchTask": "Run Spring Boot in Docker with Debug",
|
||||
"postDebugTask": "Stop Spring Boot in Docker",
|
||||
}
|
||||
]
|
||||
}
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"java.compile.nullAnalysis.mode": "automatic"
|
||||
}
|
||||
29
.vscode/tasks.json
vendored
Normal file
29
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Run Spring Boot in Docker with Debug",
|
||||
"type": "process",
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"exec",
|
||||
"-it",
|
||||
"springboot-dev",
|
||||
"./mvnw",
|
||||
"spring-boot:run",
|
||||
"-Dspring-boot.run.jvmArguments=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
|
||||
],
|
||||
"problemMatcher": [],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "Stop Spring Boot in Docker",
|
||||
"type": "shell",
|
||||
"command": "docker exec springboot-dev pkill -f spring-boot:run",
|
||||
"problemMatcher": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -18,11 +18,14 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile.dev
|
||||
container_name: springboot-dev
|
||||
command: ./mvnw spring-boot:run
|
||||
#command: ./mvnw spring-boot:run
|
||||
command: tail -f /dev/null
|
||||
volumes:
|
||||
- ./:/app
|
||||
- ./m2:/root/.m2
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "5005:5005"
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
|
||||
@ -0,0 +1,24 @@
|
||||
package com.printhub.printhub.controller.configuration;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("/configuration/printers")
|
||||
public class PrintersController {
|
||||
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
|
||||
@GetMapping
|
||||
public String index(Model model, Locale locale) {
|
||||
model.addAttribute("title", messageSource.getMessage("t-printers", null, locale));
|
||||
return "printhub/configuration/printers";
|
||||
}
|
||||
}
|
||||
3
src/main/resources/i18n/en/printers.properties
Normal file
3
src/main/resources/i18n/en/printers.properties
Normal file
@ -0,0 +1,3 @@
|
||||
t-printers=Printers
|
||||
t-printers-list=Printers List
|
||||
t-printers-name=Name
|
||||
3
src/main/resources/i18n/es/printers.properties
Normal file
3
src/main/resources/i18n/es/printers.properties
Normal file
@ -0,0 +1,3 @@
|
||||
t-printers=Impresoras
|
||||
t-printers-list=Lista de Impresoras
|
||||
t-printers-name=Nombre
|
||||
@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{printhub/layout}">
|
||||
|
||||
<th:block layout:fragment="pagetitle">
|
||||
<!--page title-->
|
||||
<div th:replace="~{printhub/partials/title-meta :: title-meta(${title})}"></div>
|
||||
</th:block>
|
||||
|
||||
<head>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div layout:fragment="content">
|
||||
<!-- start page title -->
|
||||
<div th:replace="~{printhub/partials/page-title :: page-title(${title},'Pages')}"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<th:block layout:fragment="pagejs">
|
||||
</th:block>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@ -1,4 +1,4 @@
|
||||
<html >
|
||||
<html>
|
||||
|
||||
<body>
|
||||
<div th:fragment="sidebar" th:remove="tag">
|
||||
@ -35,7 +35,13 @@
|
||||
|
||||
<div id="two-column-menu">
|
||||
</div>
|
||||
<li href="/" class="menu-title"><span data-key="t-menu">Menu</span></li>
|
||||
<ul class="navbar-nav" id="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="/">
|
||||
<i class="ri-home-line"></i> <span data-key="t-home">Inicio</span>
|
||||
</a>
|
||||
</li>
|
||||
<div th:replace="~{printhub/partials/sidebarMenus/configurationMenu :: configuration}"></div>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<div th:fragment="configuration" th:remove="tag">
|
||||
<li class="menu-title"><span data-key="t-menu">Menu</span></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link menu-link" href="#configurationMenu" data-bs-toggle="collapse" role="button"
|
||||
aria-expanded="false" aria-controls="configurationMenu">
|
||||
|
||||
Reference in New Issue
Block a user