Skip to content

Commit

Permalink
Enhance UrlMappingsHolderFactoryBean
Browse files Browse the repository at this point in the history
Remove unneed code, it will cause type cast exception

Closes gh-415
  • Loading branch information
rainboyan committed Jul 25, 2024
1 parent 2105fab commit 1e1cf9e
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2004-2023 the original author or authors.
* Copyright 2004-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -140,14 +140,6 @@ public void afterPropertiesSet() throws Exception {
GrailsControllerUrlMappings grailsControllerUrlMappings = new GrailsControllerUrlMappings(this.grailsApplication,
defaultUrlMappingsHolder, this.grailsUrlConverter);

((ConfigurableApplicationContext) this.applicationContext).addApplicationListener(
(ApplicationListener<ArtefactAdditionEvent>) event -> {
GrailsClass artefact = event.getArtefact();
if (artefact instanceof GrailsControllerClass) {
grailsControllerUrlMappings.registerController((GrailsControllerClass) artefact);
}
});

this.urlMappingsHolder = grailsControllerUrlMappings;
}

Expand Down

0 comments on commit 1e1cf9e

Please sign in to comment.