diff --git a/src/main/java/tech/ailef/dbadmin/external/MvcConfig.java b/src/main/java/tech/ailef/dbadmin/external/MvcConfig.java index 50f98db..2af527b 100644 --- a/src/main/java/tech/ailef/dbadmin/external/MvcConfig.java +++ b/src/main/java/tech/ailef/dbadmin/external/MvcConfig.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external; import org.springframework.beans.factory.annotation.Autowired; diff --git a/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java b/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java index 5573e61..1ec17d2 100644 --- a/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java +++ b/src/main/java/tech/ailef/dbadmin/external/controller/DataExportController.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.controller; import java.io.ByteArrayOutputStream; @@ -46,6 +66,7 @@ import tech.ailef.dbadmin.external.dbmapping.query.DbQueryResultRow; import tech.ailef.dbadmin.external.dto.DataExportFormat; import tech.ailef.dbadmin.external.dto.QueryFilter; import tech.ailef.dbadmin.external.exceptions.DbAdminException; +import tech.ailef.dbadmin.external.exceptions.DbAdminNotFoundException; import tech.ailef.dbadmin.external.misc.Utils; import tech.ailef.dbadmin.internal.model.ConsoleQuery; import tech.ailef.dbadmin.internal.repository.ConsoleQueryRepository; @@ -70,7 +91,7 @@ public class DataExportController { @GetMapping("/console/export/{queryId}") public ResponseEntity export(@PathVariable String queryId, @RequestParam String format, @RequestParam MultiValueMap otherParams) { - ConsoleQuery query = queryRepository.findById(queryId).orElseThrow(() -> new DbAdminException("Query not found: " + queryId)); + ConsoleQuery query = queryRepository.findById(queryId).orElseThrow(() -> new DbAdminNotFoundException("Query not found: " + queryId)); DataExportFormat exportFormat = null; try { diff --git a/src/main/java/tech/ailef/dbadmin/external/controller/DefaultDbAdminController.java b/src/main/java/tech/ailef/dbadmin/external/controller/DefaultDbAdminController.java index 66f60f1..a5d1f06 100644 --- a/src/main/java/tech/ailef/dbadmin/external/controller/DefaultDbAdminController.java +++ b/src/main/java/tech/ailef/dbadmin/external/controller/DefaultDbAdminController.java @@ -34,7 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.http.HttpStatus; import org.springframework.jdbc.UncategorizedSQLException; -import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Controller; import org.springframework.transaction.TransactionSystemException; import org.springframework.ui.Model; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/DbAdminRepository.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/DbAdminRepository.java index 0fe9b85..9dc25ae 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/DbAdminRepository.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/DbAdminRepository.java @@ -1,5 +1,6 @@ /* * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + * Copyright (C) 2023 Ailef (http://ailef.tech) * * This program is free software: you can redistribute it and/or modify diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryOutputField.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryOutputField.java index c38bab9..3d1afb2 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryOutputField.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryOutputField.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.dbmapping.query; import java.util.Objects; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResult.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResult.java index c60797b..c39d22e 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResult.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResult.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.dbmapping.query; import java.util.ArrayList; diff --git a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResultRow.java b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResultRow.java index a1630cd..d6d87c1 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResultRow.java +++ b/src/main/java/tech/ailef/dbadmin/external/dbmapping/query/DbQueryResultRow.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.dbmapping.query; import java.util.HashMap; diff --git a/src/main/java/tech/ailef/dbadmin/external/dto/DataExportFormat.java b/src/main/java/tech/ailef/dbadmin/external/dto/DataExportFormat.java index 442e036..14a1527 100644 --- a/src/main/java/tech/ailef/dbadmin/external/dto/DataExportFormat.java +++ b/src/main/java/tech/ailef/dbadmin/external/dto/DataExportFormat.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.dto; public enum DataExportFormat { diff --git a/src/main/java/tech/ailef/dbadmin/external/exceptions/DbAdminNotFoundException.java b/src/main/java/tech/ailef/dbadmin/external/exceptions/DbAdminNotFoundException.java index a147db2..1be0cd1 100644 --- a/src/main/java/tech/ailef/dbadmin/external/exceptions/DbAdminNotFoundException.java +++ b/src/main/java/tech/ailef/dbadmin/external/exceptions/DbAdminNotFoundException.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.external.exceptions; import org.springframework.http.HttpStatus; diff --git a/src/main/java/tech/ailef/dbadmin/internal/model/ConsoleQuery.java b/src/main/java/tech/ailef/dbadmin/internal/model/ConsoleQuery.java index cf7fde5..d23b0ad 100644 --- a/src/main/java/tech/ailef/dbadmin/internal/model/ConsoleQuery.java +++ b/src/main/java/tech/ailef/dbadmin/internal/model/ConsoleQuery.java @@ -1,3 +1,23 @@ +/* + * Spring Boot Database Admin - An automatically generated CRUD admin UI for Spring Boot apps + + * Copyright (C) 2023 Ailef (http://ailef.tech) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + + package tech.ailef.dbadmin.internal.model; import java.time.LocalDateTime;