diff --git a/pom.xml b/pom.xml
index 5a70959..d4b7fad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -9,10 +9,10 @@
3.5.0
- com.printgo
- printgo
+ com.printhub
+ printhub
0.0.1-SNAPSHOT
- printgo
+ printhub
Demo project for Spring Boot
diff --git a/src/main/java/com/printgo/printgo/PrintgoApplication.java b/src/main/java/com/printgo/printgo/PrintgoApplication.java
deleted file mode 100644
index 45ad05a..0000000
--- a/src/main/java/com/printgo/printgo/PrintgoApplication.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.printgo.printgo;
-
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-
-@SpringBootApplication
-public class PrintgoApplication {
-
- public static void main(String[] args) {
- SpringApplication.run(PrintgoApplication.class, args);
- }
-
-}
diff --git a/src/main/java/com/printgo/printgo/config/I18nBaseNameProvider.java b/src/main/java/com/printgo/printgo/config/I18nBaseNameProvider.java
deleted file mode 100644
index b6173d3..0000000
--- a/src/main/java/com/printgo/printgo/config/I18nBaseNameProvider.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package com.printgo.printgo.config;
-
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.stereotype.Component;
-
-import java.io.IOException;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-@Component
-public class I18nBaseNameProvider {
-
- public String[] getBaseNames() {
- Set baseNames = new LinkedHashSet<>();
-
- PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
-
- try {
- // Busca todos los .properties bajo i18n/*/*.properties
- var resources = resolver.getResources("classpath*:/i18n/*/*.properties");
-
- for (var res : resources) {
- String uri = res.getURI().toString();
- // Extraer ruta base sin extensión .properties ni sufijos como _en
- String base = uri
- .replaceAll(".*?/i18n/", "i18n/")
- .replaceAll("(_[a-zA-Z]+)?\\.properties$", "")
- .replace(".jar!", ""); // por si viene de un jar
-
- // Eliminar duplicados con un Set
- baseNames.add("classpath:" + base);
- }
-
- } catch (IOException e) {
- e.printStackTrace(); // o usa logger
- }
-
- return baseNames.toArray(new String[0]);
- }
-}
diff --git a/src/main/java/com/printgo/printgo/config/I18nConfig.java b/src/main/java/com/printgo/printgo/config/I18nConfig.java
deleted file mode 100644
index 06c1908..0000000
--- a/src/main/java/com/printgo/printgo/config/I18nConfig.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package com.printgo.printgo.config;
-
-import org.springframework.context.MessageSource;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.context.support.ReloadableResourceBundleMessageSource;
-import org.springframework.web.servlet.LocaleResolver;
-import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
-import org.springframework.web.servlet.i18n.SessionLocaleResolver;
-
-import java.util.Locale;
-
-@Configuration
-public class I18nConfig {
-
- private final I18nBaseNameProvider baseNameProvider;
-
- public I18nConfig(I18nBaseNameProvider baseNameProvider) {
- this.baseNameProvider = baseNameProvider;
- }
-
- @Bean
- public MessageSource messageSource() {
- ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
-
- String[] baseNames = baseNameProvider.getBaseNames();
- messageSource.setBasenames(baseNames);
-
- messageSource.setDefaultEncoding("UTF-8");
- return messageSource;
- }
-
- @Bean
- public LocaleResolver localeResolver() {
- SessionLocaleResolver resolver = new SessionLocaleResolver();
- resolver.setDefaultLocale(Locale.forLanguageTag("es"));
- return resolver;
- }
-
- @Bean
- public LocaleChangeInterceptor localeChangeInterceptor() {
- LocaleChangeInterceptor interceptor = new LocaleChangeInterceptor();
- interceptor.setParamName("lang");
- return interceptor;
- }
-
- @Bean
- public WebMvcConfigurer webMvcConfigurer(LocaleChangeInterceptor interceptor) {
- return new WebMvcConfigurer() {
- @Override
- public void addInterceptors(InterceptorRegistry registry) {
- registry.addInterceptor(interceptor);
- }
- };
- }
-}
diff --git a/src/main/java/com/printgo/printgo/controller/config/I18nController.java b/src/main/java/com/printgo/printgo/controller/config/I18nController.java
deleted file mode 100644
index 0caf3dc..0000000
--- a/src/main/java/com/printgo/printgo/controller/config/I18nController.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.printgo.printgo.controller.config;
-
-import com.printgo.printgo.service.I18nService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-
-import java.util.Map;
-
-@RestController
-@RequestMapping("/api/lang")
-public class I18nController {
-
- @Autowired
- private I18nService i18nService;
-
- @GetMapping
- public Map getLanguage(@RequestParam(defaultValue = "es") String lang) {
- return i18nService.getTranslations(lang);
- }
-}
-
diff --git a/src/main/java/com/printgo/printgo/controller/home/HomeController.java b/src/main/java/com/printgo/printgo/controller/home/HomeController.java
deleted file mode 100644
index 6615844..0000000
--- a/src/main/java/com/printgo/printgo/controller/home/HomeController.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.printgo.printgo.controller.home;
-
-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 java.util.Locale;
-
-@Controller
-public class HomeController {
-
- @Autowired
- private MessageSource messageSource;
-
- @GetMapping("/")
- public String index(Model model, Locale locale) {
- model.addAttribute("title", messageSource.getMessage("t-home", null, locale));
- return "printgo/home";
- }
-}
-
diff --git a/src/main/java/com/printgo/printgo/service/I18nService.java b/src/main/java/com/printgo/printgo/service/I18nService.java
deleted file mode 100644
index 714ad35..0000000
--- a/src/main/java/com/printgo/printgo/service/I18nService.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package com.printgo.printgo.service;
-
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.stereotype.Service;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.nio.charset.StandardCharsets;
-import java.util.*;
-
-@Service
-public class I18nService {
-
- public Map getTranslations(String lang) {
- Map translations = new HashMap<>();
-
- PathMatchingResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
- try {
- var resources = resolver.getResources("classpath:i18n/" + lang + "/*.properties");
-
- for (var resource : resources) {
- Properties props = new Properties();
- try (var reader = new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8)) {
- props.load(reader);
- for (String key : props.stringPropertyNames()) {
- translations.put(key, props.getProperty(key));
- }
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
-
- return translations;
- }
-}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 6600447..16e5a8b 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,2 +1,9 @@
-spring.application.name=printgo
+spring.application.name=printhub
spring.thymeleaf.cache=false
+
+spring.datasource.url=${SPRING_DATASOURCE_URL}
+spring.datasource.username=${SPRING_DATASOURCE_USERNAME}
+spring.datasource.password=${SPRING_DATASOURCE_PASSWORD}
+
+spring.jpa.hibernate.ddl-auto=update
+spring.jpa.show-sql=true
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/home.html b/src/main/resources/templates/printgo/home.html
deleted file mode 100644
index 4b83111..0000000
--- a/src/main/resources/templates/printgo/home.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/layout.html b/src/main/resources/templates/printgo/layout.html
deleted file mode 100644
index eee3065..0000000
--- a/src/main/resources/templates/printgo/layout.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/footer.html b/src/main/resources/templates/printgo/partials/footer.html
deleted file mode 100644
index 357582b..0000000
--- a/src/main/resources/templates/printgo/partials/footer.html
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/page-title.html b/src/main/resources/templates/printgo/partials/page-title.html
deleted file mode 100644
index 119a106..0000000
--- a/src/main/resources/templates/printgo/partials/page-title.html
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/sidebar.html b/src/main/resources/templates/printgo/partials/sidebar.html
deleted file mode 100644
index 36b0c06..0000000
--- a/src/main/resources/templates/printgo/partials/sidebar.html
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/sidebarMenus/configurationMenu.html b/src/main/resources/templates/printgo/partials/sidebarMenus/configurationMenu.html
deleted file mode 100644
index ae2ea24..0000000
--- a/src/main/resources/templates/printgo/partials/sidebarMenus/configurationMenu.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/title-meta.html b/src/main/resources/templates/printgo/partials/title-meta.html
deleted file mode 100644
index 9ee1049..0000000
--- a/src/main/resources/templates/printgo/partials/title-meta.html
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/main/resources/templates/printgo/partials/topbar.html b/src/main/resources/templates/printgo/partials/topbar.html
deleted file mode 100644
index 8926d70..0000000
--- a/src/main/resources/templates/printgo/partials/topbar.html
+++ /dev/null
@@ -1,110 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/java/com/printgo/printgo/PrintgoApplicationTests.java b/src/test/java/com/printgo/printgo/PrintgoApplicationTests.java
deleted file mode 100644
index 43aa5c7..0000000
--- a/src/test/java/com/printgo/printgo/PrintgoApplicationTests.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package com.printgo.printgo;
-
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-@SpringBootTest
-class PrintgoApplicationTests {
-
- @Test
- void contextLoads() {
- }
-
-}