refactor: reorganize system package for better cohesion

Signed-off-by: Mickael-7 <mickael.albuquerque@upe.br>
This commit is contained in:
Mickael-7 2025-12-07 18:01:26 -03:00
parent 9b820120ce
commit 2969add25c
5 changed files with 27 additions and 7 deletions

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.springframework.samples.petclinic.system;
package org.springframework.samples.petclinic.system.config;
import org.springframework.boot.cache.autoconfigure.JCacheManagerCustomizer;
import org.springframework.cache.annotation.EnableCaching;
@ -27,6 +27,11 @@ import javax.cache.configuration.MutableConfiguration;
* Cache configuration intended for caches providing the JCache API. This configuration
* creates the used cache for the application and enables statistics that become
* accessible via JMX.
*
* @author Nathan Dalbert
* @author Paulo Henrique
* @author Mickael de Albuquerque
* @author Igor Rego
*/
@Configuration(proxyBeanMethods = false)
@EnableCaching

View file

@ -1,4 +1,4 @@
package org.springframework.samples.petclinic.system;
package org.springframework.samples.petclinic.system.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -18,7 +18,10 @@ import java.util.Locale;
* language changes via the URL parameter (e.g., <code>?lang=de</code>).
* </p>
*
* @author Anuj Ashok Potdar
* @author Nathan Dalbert
* @author Paulo Henrique
* @author Mickael de Albuquerque
* @author Igor Rego
*/
@Configuration
@SuppressWarnings("unused")

View file

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.samples.petclinic.system;
package org.springframework.samples.petclinic.system.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@ -21,12 +21,15 @@ import org.springframework.web.bind.annotation.GetMapping;
/**
* Controller used to showcase what happens when an exception is thrown
*
* @author Michael Isvy
* @author Nathan Dalbert
* @author Paulo Henrique
* @author Mickael de Albuquerque
* @author Igor Rego
* <p/>
* Also see how a view that resolves to "error" has been added ("error.html").
*/
@Controller
class CrashController {
public class CrashController {
@GetMapping("/oups")
public String triggerException() {

View file

@ -14,11 +14,19 @@
* limitations under the License.
*/
package org.springframework.samples.petclinic.system;
package org.springframework.samples.petclinic.system.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
/**
* Welcome page controller.
*
* @author Nathan Dalbert
* @author Paulo Henrique
* @author Mickael de Albuquerque
* @author Igor Rego
*/
@Controller
class WelcomeController {

View file

@ -17,6 +17,7 @@
package org.springframework.samples.petclinic.system;
import org.junit.jupiter.api.Test;
import org.springframework.samples.petclinic.system.web.CrashController;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;