-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring code samples refresh + overall refresh of deps #702
base: master
Are you sure you want to change the base?
Spring code samples refresh + overall refresh of deps #702
Conversation
TomaszGaweda
commented
Feb 7, 2025
- Made all projects be a child of main project, so eg. failsafe and surefire configurations are shared
- Modernized code
- Fixed known flakiness
- Modernized dependencies
.setProperty("keyStorePassword", "123456") // | ||
.setProperty("trustStore", "src/ca.p12") // | ||
.setProperty("trustStorePassword", "123456"); | ||
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reason: my local JDK got confused with types there, it's safer to extract a variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK or IDE?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK (built via maven)
serialization/hazelcast-airlines/grid-node/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
…application.properties
.setProperty("keyStorePassword", "123456") // | ||
.setProperty("trustStore", "src/ca.p12") // | ||
.setProperty("trustStorePassword", "123456"); | ||
SSLConfig sslConf = config.getNetworkConfig().setSSLConfig(new SSLConfig()).getSSLConfig(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JDK or IDE?
@@ -25,9 +25,10 @@ | |||
<version>0.1-SNAPSHOT</version> | |||
</dependency> | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double
Blank line.
pom.xml
Outdated
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.junit.vintage</groupId> | ||
<artifactId>junit-vintage-engine</artifactId> | ||
<version>5.10.0</version> | ||
<version>5.11.4</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private String toHtmlTable(Map<String, Object> attributes) { | ||
StringBuilder html = new StringBuilder("<html>"); | ||
html.append("<table border=\"1\" cellpadding=\"5\" cellspacing=\"5\">"); | ||
StringBuilder html = new StringBuilder("<html><body>"); | ||
html.append("<table style=\"border-spacing: 5px; border: 1px solid black;\">"); | ||
attributes.forEach((k, v) -> addHtmlTableRow(html, k, v)); | ||
html.append("</table></html>"); | ||
html.append("</table></body></html>"); | ||
return html.toString(); | ||
} | ||
|
||
private void addHtmlTableRow(StringBuilder content, String key, Object value) { | ||
content.append("<tr>") | ||
.append("<th>").append(key).append("</th>") | ||
.append("<td>").append(value).append("</td>") | ||
.append("</tr>"); | ||
.append("<th style=\"padding: 5px;\">").append(key).append("</th>") | ||
.append("<td style=\"padding: 5px;\">").append(value).append("</td>") | ||
.append("</tr>"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like whole thing could be implemented better (no reflection on your changes) - maybe a text-block template with a .formatted
call consuming a stream-mapping of attributes
?
spring/spring-data-hazelcast-chemistry-sample/server/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
@@ -93,18 +93,17 @@ private void printCachesFromCacheManager() { | |||
private void printCachesFromHazelcast() { | |||
LOGGER.info("Caches from hazelcast:"); | |||
for (DistributedObject distributedObject : hazelcastInstance.getDistributedObjects()) { | |||
LOGGER.info(" - " + distributedObject.getName()); | |||
LOGGER.info(" - {}", distributedObject.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤘
…' into 6.0/spring-boot-embedded-refresh
...spring-session-hazelcast/src/main/java/com/hazelcast/guide/controller/SessionController.java
Outdated
Show resolved
Hide resolved
...session-hazelcast/src/test/java/com/hazelcast/guide/HazelcastSpringSessionApplicationIT.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jack Green <[email protected]>
…' into 6.0/spring-boot-embedded-refresh
...spring-session-hazelcast/src/main/java/com/hazelcast/guide/controller/SessionController.java
Outdated
Show resolved
Hide resolved
…t/src/main/java/com/hazelcast/guide/controller/SessionController.java Co-authored-by: Jack Green <[email protected]>