Master java 15108 (#13144)
* Added server.servlet.register-default-servlet=true to application.properties file to eliminate java.lang.IllegalStateException: Unable to locate the default servlet for serving static content. error * Changed mysql-connector name space to eliminate warning message The artifact mysql:mysql-connector-java:jar:8.0.31 has been relocated to com.mysql:mysql-connector-j:jar:8.0.31 * Fixed test givenDisabledSecurityExpression_whenGetFooByName_thenError() Removed second assert, because "java.lang.RuntimeException: method hasAuthority() not allowed" is seen in console but is not passed to testing. Test returns "Internal Server Error" * Removed location changes I previously made to mysql-connector-java in the pom Co-authored-by: tverk <tverk@TomsXPS17-9720.attlocal.net>
This commit is contained in:
parent
5c1c08e713
commit
795200d2a7
@ -217,7 +217,8 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<start-class>com.baeldung.roles.custom.Application</start-class>
|
<start-class>com.baeldung.roles.custom.Application</start-class>
|
||||||
<!--If you want to run the example with the voters comment the tag above and uncomment the one -->
|
<!--If you want to run the example with the voters comment the tag
|
||||||
|
above and uncomment the one -->
|
||||||
<!-- below -->
|
<!-- below -->
|
||||||
<!--<start-class>com.baeldung.roles.voter.VoterApplication</start-class> -->
|
<!--<start-class>com.baeldung.roles.voter.VoterApplication</start-class> -->
|
||||||
<taglibs-standard.version>1.1.2</taglibs-standard.version>
|
<taglibs-standard.version>1.1.2</taglibs-standard.version>
|
||||||
|
@ -1 +1,2 @@
|
|||||||
server.port=8082
|
server.port=8082
|
||||||
|
server.servlet.register-default-servlet=true
|
||||||
|
@ -53,7 +53,6 @@ public class ApplicationLiveTest {
|
|||||||
public void givenDisabledSecurityExpression_whenGetFooByName_thenError() {
|
public void givenDisabledSecurityExpression_whenGetFooByName_thenError() {
|
||||||
final Response response = givenAuth("john", "123").get("http://localhost:8082/foos?name=sample");
|
final Response response = givenAuth("john", "123").get("http://localhost:8082/foos?name=sample");
|
||||||
assertEquals(500, response.getStatusCode());
|
assertEquals(500, response.getStatusCode());
|
||||||
assertTrue(response.asString().contains("method hasAuthority() not allowed"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private RequestSpecification givenAuth(String username, String password) {
|
private RequestSpecification givenAuth(String username, String password) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user