Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
TAKETODAY committed Apr 24, 2024
1 parent 9da4a53 commit 29ff518
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/*
* Original Author -> Harry Yang (taketoday@foxmail.com) https://taketoday.cn
* Copyright © TODAY & 2017 - 2022 All Rights Reserved.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER
* Copyright 2017 - 2024 the original author or authors.
*
* 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
Expand All @@ -15,7 +12,7 @@
* 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 [http://www.gnu.org/licenses/]
* along with this program. If not, see [https://www.gnu.org/licenses/]
*/

package cn.taketoday.web.handler;
Expand All @@ -27,12 +24,10 @@
import java.net.BindException;
import java.net.SocketException;

import cn.taketoday.util.ClassUtils;
import cn.taketoday.stereotype.Controller;
import cn.taketoday.util.ClassUtils;
import cn.taketoday.web.annotation.ExceptionHandler;
import cn.taketoday.web.handler.method.ExceptionHandlerMethodResolver;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
Expand Down Expand Up @@ -144,7 +139,7 @@ static class AmbiguousController {
public void handle() { }

@ExceptionHandler({ BindException.class, IllegalArgumentException.class })
public String handle1(Exception ex, HttpServletRequest request, HttpServletResponse response)
public String handle1(Exception ex)
throws IOException {
return ClassUtils.getShortName(ex.getClass());
}
Expand Down
18 changes: 18 additions & 0 deletions today-web/today-web.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright 2017 - 2024 the original author or authors.
*
* 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 [https://www.gnu.org/licenses/]
*/

description = "Infra Web"

configurations {
Expand Down Expand Up @@ -65,6 +82,7 @@ dependencies {
testImplementation("org.xmlunit:xmlunit-matchers")
testImplementation("io.projectreactor.tools:blockhound")
testImplementation("io.micrometer:micrometer-observation-test")
testImplementation("jakarta.annotation:jakarta.annotation-api")

testRuntimeOnly("com.sun.mail:jakarta.mail")
testRuntimeOnly("com.sun.xml.bind:jaxb-core")
Expand Down

0 comments on commit 29ff518

Please sign in to comment.