Skip to content

Commit

Permalink
Update Application.java.ejs
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima authored Feb 21, 2025
1 parent 4afb590 commit fb51fd2
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,14 @@ public class <%= mainClass %> {
*/
public static void main(String[] args) {
<%_ if (cacheProviderHazelcast) { _%>
// Workaround Hazelcast issue: https://github.com/hazelcast/hazelcast/issues/26361#issuecomment-2489778475
System.setProperty("spring.devtools.restart.enabled", "false");
try {
// Workaround Hazelcast issue: https://github.com/hazelcast/hazelcast/issues/26361#issuecomment-2489778475
Class.forName("org.springframework.boot.devtools.autoconfigure.DevToolsProperties", false, SpringApplication.class.getClassLoader());
System.setProperty("spring.devtools.restart.enabled", "false");
LOG.warn("Spring Boot Developer Tools restart has been disabled using System property in order to prevent issues with Hazelcast");
} catch (Exception e){
// Devtools not found, ignore
}

<%_ } _%>
SpringApplication app = new SpringApplication(<%= mainClass %>.class);
Expand Down

0 comments on commit fb51fd2

Please sign in to comment.