]> juplo.de Git - website/commitdiff
fix: Sprachbezeichner in Code-Blöcken aller Blog-Artikel korrigiert
authorKai Moritz <kai.milan.moritz@googlemail.com>
Mon, 22 Jun 2026 19:51:18 +0000 (19:51 +0000)
committerKai Moritz <kai.milan.moritz@googlemail.com>
Mon, 22 Jun 2026 19:51:18 +0000 (19:51 +0000)
Shiki ist case-sensitiv und erkennt Bezeichner wie `Java`, `Bash`, `XPath`
nicht — alle fallen auf plaintext zurück. Behoben:

- `Java` → `java` in allen 2016er Facebook-App-Posts
- `Java` → `xml` in xpath-Artikel (Blöcke enthielten XML, nicht Java)
- `Bash` → `log` in problems-deploying (Inhalt ist Log-Output)
- `XPath` → `text` (Shiki hat kein XPath/XQuery-Highlighting)
- `hosts` → `text` (Shiki kennt kein hosts-Format)
- Trailing space nach ` ``` ` in outbox-part-1 entfernt (`java`)
- Unlabeled Opening-Fences mit passendem Label versehen:
  `javascript`, `xml`, `java`, `properties`, `shellsession`, `text`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 files changed:
src/content/blog/2012/lange-ladezeiten-durch-openx-werbebanner-verhindern.md
src/content/blog/2013/hibernate4-maven-plugin-1-0-1-released.md
src/content/blog/2013/hibernate4-maven-plugin-1-0-2-release.md
src/content/blog/2013/hibernate4-maven-plugin-1-0-3-released.md
src/content/blog/2014/hibernate4-maven-plugin-1-0-4-released.md
src/content/blog/2014/hibernate4-maven-plugin-1-0-5-released.md
src/content/blog/2015/bypassing-the-same-origin-policiy-for-loal-files-during-development.md
src/content/blog/2015/hibernate4-maven-plugin-1-1-0-released.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-00.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-01-behind-the-scenes.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-02-how-spring-social-works.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-03-implementing-a-user-id-source.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-04-signing-in-users.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-05-refactor-the-redirect-logic.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-06-sign-in-users-through-the-canvas-page.md
src/content/blog/2016/develop-a-facebook-app-with-spring-social-part-07-what-is-going-on-on-the-wire.md
src/content/blog/2016/hibernate-maven-plugin-2-0-0-released.md
src/content/blog/2016/problems-deploying-a-spring-boot-app-as-war.md
src/content/blog/2016/xpath-2-0-deep-equal-does-not-match-like-expected-the-problem-with-whitespace.md
src/content/blog/2019/actuator-httptrace-does-not-work-with-spring-boot-2-2.md
src/content/blog/2020/deduplicating-partitioned-data-with-kafka-streams.md
src/content/blog/2020/how-to-instantiatiate-multiple-beans-dinamically-in-spring-boot-based-on-configuration-properties.md
src/content/blog/2020/how-to-redirect-to-spring-security-oauth2-behind-a-gateway-proxy-hiding-the-app-behind-a-reverse-proxy-gateway.md
src/content/blog/2020/testing-exception-handling-in-spring-mvc.md
src/content/blog/2021/implementing-the-outbox-pattern-with-kafka-part-0-the-example.md
src/content/blog/2021/implementing-the-outbox-pattern-with-kafka-part-1-the-outbox-table.md

index c93c69de0c7b7197a28826a15641022b4a308a4d..49404701fecaccf392e6918be5b326045fe5bbfe 100644 (file)
@@ -33,7 +33,7 @@ Das klingt alles einfach und schön - doch wie so oft gilt leider:
 
 ## Der Teufel steckt im Detail
 
-```
+```javascript
 /** Optimierte Methoden für die Werbe-Einblendung via OpenX */
 
 /** see: http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/ */
index cb35f9714856d1bdd31e1fa6c68a9f998830eabb..8932d8ddf139545bb0daabae2e05aae02b31097f 100644 (file)
@@ -26,7 +26,7 @@ Appart from two bugfixes, this version includes some minor improvements, which m
 
 ## Release notes:
 
-```
+```text
 commit 4b507b15b0122ac180e44b8418db8d9143ae9c3a
 Author: Kai Moritz
 Date:   Tue Jan 15 23:09:01 2013 +0100
index 4b0846ffa64f88db4545e792520ca3f32e31c6f5..b638630e863a58d7f359c0848356fb4e79cd8db3 100644 (file)
@@ -31,7 +31,7 @@ This release includes:
 
 ## Release notes:
 
-```
+```text
 commit 4edef457d2b747d939a141de24bec5e32abbc0c7
 Author: Kai Moritz
 Date:   Fri Aug 2 00:37:40 2013 +0200
index 8afa4b32989cc3deb5f72afedaa84d343612691d..c68e8d500488e39cd083ae33ab8711796badd034 100644 (file)
@@ -39,7 +39,7 @@ Many thanks also to Stephen Johnson and Eduard Szente, who pointed out bugs and
 
 ## Release notes:
 
-```
+```text
 commit adb20bc4da63d4cec663ca68648db0f808e3d181
 Author: Kai Moritz
 Date:   Fri Oct 18 01:52:27 2013 +0200
index 1ae14ab16cc7338762df9cba17c4bbc1f3ef27a7..93c582fd658058a762b2502c5110a9dce19f356a 100644 (file)
@@ -30,7 +30,7 @@ If you have some special small-sized (example) use-cases for the plugin, we woul
 
 ## Release notes:
 
-```
+```text
 commit f3dabc0e6e3676244986b5bbffdb67d427c8383c
 Author: Kai Moritz
 Date:   Mon Jun 2 10:31:12 2014 +0200
index e1ecca93442b93887872c0d2ec69e50667dc3f84..99c74574fca3580c6750232a6e4fb5029c08e466 100644 (file)
@@ -38,7 +38,7 @@ _If you stumble across any problems, please let me know!_
 
 ## Release notes:
 
-```
+```text
 commit ec30af2068f2d12a9acf65474ca1a4cdc1aa7122
 Author: Kai Moritz
 Date:   Tue Nov 11 15:28:12 2014 +0100
index b42d2a849399bc96ca29b0c77a5b07bbbd079321..2804ab4d75a08014b0839c49a879d0cd4f707fb2 100644 (file)
@@ -52,7 +52,7 @@ You can read more about that rule on [MDN](https://developer.mozilla.org/en-US/d
 I often violate that rule, when developing templates for dynamically rendered pages with [Thymeleaf](http://www.thymeleaf.org/ "Read more about the XML/XHTML/HTML5 template engine Thymeleaf"), or similar techniques.
 That is, because I like to place the template-files on a subdirectory of the directory, that contains my webapp ( `src/main/webapp` with Maven):
 
-```
+```text
 + src/main/webapp/
   + css/
   + img/
index cdfb7cddc7b15c3daac11f9ccf1066858bb3efaa..78e3b9a3b78983552e8a373fb4a6b7a93cd87f42 100644 (file)
@@ -38,7 +38,7 @@ This release also fixes a bug, that occured on some platforms, if the path to th
 
 ## Release notes:
 
-```
+```text
 commit 94e6b2e93fe107e75c9d20aa1eb3126e78a5ed0a
 Author: Kai Moritz
 Date:   Sat May 16 14:14:44 2015 +0200
index dfd47f258be83424b07137d5315bdbfb5e352bc7..18703813123737ce36c00b4cc6b2acbd7643ab7b 100644 (file)
@@ -54,7 +54,7 @@ produces a
 The code for this.logging.level.de.juplo.yourshouter= part is tagged with `part-00`.
 Appart from the HTML-templates, the attic for spring-boot and the build-definitions in the `pom.xml` it mainly consists of one file:
 
-```Java
+```java
 @Controller
 @RequestMapping("/")
 public class HomeController
index 5f0c0558cbbb463423423e67b86adb05ed1e7555..bb26f3aeeda89685adc01d7a81bc7b7db5ce76ed 100644 (file)
@@ -58,7 +58,7 @@ It also configures, that a request-scoped bean of the type `Connection<Facebook>
 
 The following class rebuilds the same configuration explicitly:
 
-```Java
+```java
 @Configuration
 @EnableSocial
 public class SocialConfig extends SocialConfigurerAdapter
index daf9bffcaecf2f42e0acefa436bd20567ed4ff0c..fcab053614dd05586dc1eec94b33121a7b40a850 100644 (file)
@@ -48,7 +48,7 @@ Every time, when it prepares a request for us, Spring Social will ask this sourc
 
 Attentive readers might have noticed, that we have configured such a source, when we were [explicitly rebuilding](/develop-a-facebook-app-with-spring-social-part-01-behind-the-scenes/ "Jump back to re-read our explicitly rebuild configuration") the automatic default-configuration of Spring Boot:
 
-```Java
+```java
 public class AnonymousUserIdSource implements UserIdSource
 {
   @Override
index a351be8f1f8e0649c5a0010a4e4454e1fc27daa5..797a83df3f617fdcd21ce0b0203a6cd5f7f58b20 100644 (file)
@@ -72,7 +72,7 @@ Mainly, there are two hooks to do that, that means: two interfaces, we have to i
 The implementation of `ConnectionSignUp` simply uses the ID, that is provided by the social network.
 Since we are only signing in users from Facebook, these ID's are guaranteed to be unique.
 
-```Java
+```java
 public class ProviderUserIdConnectionSignUp implements ConnectionSignUp
 {
   @Override
@@ -87,7 +87,7 @@ public class ProviderUserIdConnectionSignUp implements ConnectionSignUp
 The implementation of `UserIdSource` retrieves the ID, that was stored in the `SecurityContext` (our simple implementation — not to be confused with the class from Spring Security).
 If no user is stored in the `SecurityContext`, it falls back to the old behavior and returns the fix id `anonymous`.
 
-```Java
+```java
 public class SecurityContextUserIdSource implements UserIdSource
 {
   private final static Logger LOG =
@@ -116,7 +116,7 @@ public class SecurityContextUserIdSource implements UserIdSource
 
 To replace the `AnonymousUserIdSource` by our new implementation, we simply instantiate that instead of the old one in our configuration-class `SocialConfig`:
 
-```Java
+```java
 @Override
 public UserIdSource getUserIdSource()
 {
@@ -128,7 +128,7 @@ public UserIdSource getUserIdSource()
 There are several ways to plug in the `ConnectionSignUp`.
 I decided, to plug it into the instance of `InMemoryUsersConnectionRepository`, that our configuration uses, because this way, the user will be signed up automatically on sign in, if it is not known to the application:
 
-```Java
+```java
 @Override
 public UsersConnectionRepository getUsersConnectionRepository(
     ConnectionFactoryLocator connectionFactoryLocator
index c21212ade561deabf5ae739e15d976569fef3074..1ec69159f6a5b52843000b2eed2100c47bbac8b1 100644 (file)
@@ -57,7 +57,7 @@ Spring Social provides the interface `SignInAdapter`, that it calls every time,
 This enables us, to be aware of that event and remember the user for subsequent calls.
 Our implementation stores the user in our `SecurityContext` to sign him in and creates a cookie to remember him for subsequent calls:
 
-```Java
+```java
 public class UserCookieSignInAdapter implements SignInAdapter
 {
   private final static Logger LOG =
@@ -94,7 +94,7 @@ If you return a string here, for example `/welcome.html`, the controller would i
 
 To enable the Sign-In, we have to plug our `SignInAdapter` into the `ProviderSignInController`:
 
-```Java
+```java
 @Bean
 public ProviderSignInController signInController(
     ConnectionFactoryLocator factoryLocator,
index 7f4983e1624e5383f7be4c67d934a7ff38ce34a4..7ec010144b0339b7d41596406be809dd955b8dca 100644 (file)
@@ -42,7 +42,7 @@ To move all redirect-logic out of `HomeController` and redirect unauthenicated u
 
 We refine the method `preHandle`, so that it redirects every request to our sign-in-page, that is not authenticated:
 
-```Java
+```java
 @Override
 public boolean preHandle(
     HttpServletRequest request,
@@ -95,7 +95,7 @@ You will see, that you will be redirected to our sigin-in-page.
 As it is now not possible, to call any page except the sigin-up-page, without beeing redirected to our sign-in-page, if you are not authenticated, it is impossible to call any page without being authenticated.
 Hence, we can (and should!) refine our `UserIdSource`, to throw an exception, if that happens anyway, because it has to be a sign for a bug:
 
-```Java
+```java
 public class SecurityContextUserIdSource implements UserIdSource
 {
 
index 1abe8229facbc49fffebcbbb83c882107da8b0f1..0826bbd6f957229dc4a15392738d0ceb1ad1d845 100644 (file)
@@ -88,7 +88,7 @@ For now, you can simply change it to `https://locahost:8443/` in the settings-pa
 
 To actually enable the [automatic handling](https://developers.facebook.com/docs/games/gamesonfacebook/login#usingsignedrequest "Read about all the cumbersome steps, that would be necesarry, if you had to handle a signed_requst by yourself") of the `signed_request`, that is, decoding the `signed_request` and sign in the user with the data provided in the `signed_request`, you just have to add the `CanvasSignInController` as a bean in your `SocialConfig`:
 
-```Java
+```java
 @Bean
 public CanvasSignInController canvasSignInController(
     ConnectionFactoryLocator connectionFactoryLocator,
@@ -116,14 +116,14 @@ Since [we have "secured" all of our pages](/develop-a-facebook-app-with-spring-s
 To achieve that, we have to refine our [`UserCookieInterceptor`](/develop-a-facebook-app-with-spring-social-part-05-refactor-the-redirect-logic#redirect "Compare the changes to the unchanged method of our UserCookieInterceptor") as follows.
 First add a pattern for all pages, that are allowed to be accessed unauthenticated:
 
-```Java
+```java
 private final static Pattern PATTERN = Pattern.compile("^/signin|canvas");
 
 ```
 
 Then match the requests against this pattern, instead of the fixed string `/signin`:
 
-```Java
+```java
 if (PATTERN.matcher(request.getServletPath()).find())
   return true;
 
index 8d72fadeeb3ca74100ff96fdc99f0c1894ac211e..a17f45632d1507018217c4aa8e375891f72ee636 100644 (file)
@@ -54,7 +54,7 @@ Hence, we will switch our configuration to use the `HttpClient` from Apache, bef
 
 To siwtch from the default client, that comes with the JDK to Apaches `HttpClient`, you have to configure an instance of `HttpComponentsClientHttpRequestFactory` as `HttpRequestFactory` in your `SocialConfig`:
 
-```Java
+```java
 @Bean
 public HttpComponentsClientHttpRequestFactory requestFactory(Environment env)
 {
index d36ebcedeb483f4585214c397d1d48113b60f12f..ae973cefb30142ea01f15524a6cab910df8a97ca 100644 (file)
@@ -68,7 +68,7 @@ _Please let us know, if something wents wrong in your projects and you think it
 
 ## Release notes:
 
-```
+```text
 commit 64b7446c958efc15daf520c1ca929c6b8d3b8af5
 Author: Kai Moritz
 Date:   Tue Mar 8 00:25:50 2016 +0100
index d9aeffd323b0b537932532a53fe27b880d9aebfd..a968f5d01be945339baef41515d0286454129744 100644 (file)
@@ -23,7 +23,7 @@ The WAR was found and deployed by tomcat, but it was never started.
 Browsing the URL of the app resulted in a 404.
 And instead of [the fancy Spring-Boot ASCII-art banner](https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-spring-application.html "See, what Spring-Boot usually shows, when starting..."), the only matching entry that showed up in my log-file was:
 
-```Bash
+```log
 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Spring WebApplicationInitializers detected on classpath: [org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration$JerseyWebApplicationInitializer@1fe086c]
 
 ```
index 1ff22c4fc606fd4c3b9f1e9dc28fe45ba62f52ca..f8811a6ba1c10eb37bad746c6f81cf9d1854b134 100644 (file)
@@ -33,13 +33,13 @@ Hence, if they differ only in an attribute, your test will report that they are
 
 For example, the XPath-expression
 
-```XPath
+```text
 //child/ref[ancestor::parent/ref=.]
 ```
 
 will match the `<ref>`-node with `@id='bar'`, that is nested insiede the `<child>`-node in this example-XML, what I was not expecting:
 
-```Java
+```xml
 <root>
   <parent>
     <ref id="foo"><content>Same Text-Content</content></ref>
@@ -52,7 +52,7 @@ will match the `<ref>`-node with `@id='bar'`, that is nested insiede the `<child
 
 So, what I tried, after I found out about `deep-equal()` was the following `Xpath`-expression, which solves the problem in the above example:
 
-```XPath
+```text
 //child/ref[deep-equal(ancestor::parent/ref,.)]
 ```
 
@@ -61,7 +61,7 @@ So, what I tried, after I found out about `deep-equal()` was the following `Xpat
 But, moving on I stumbled accross cases, where I was expecting a match, but `deep-equal()` does not match the nodes.
 For example:
 
-```Java
+```xml
 <root>
   <parent>
     <ref id="same">
index e3b6988c81051d6d57cc50729992cf988f99a09b..b238788f71e808b844f80bb23c47de344e871f90 100644 (file)
@@ -34,7 +34,7 @@ To enable it — _prior to 2.2.x_ —, one only had to:
 
 1. Specifiy the dependency for Spring Boot Actuator:
 
-   ```
+   ```xml
    <dependency>
      <groupId>org.springframework.boot
      <artifactId>spring-boot-starter-actuator
@@ -67,7 +67,7 @@ _But..._
 
 The simple fix for this problem is, to add a `@Bean` of type `InMemoryHttpTraceRepository` to your **`@Configuration`**-class:
 
-```
+```java
 @Bean
 public HttpTraceRepository htttpTraceRepository()
 {
index 69fa5a8edb1228a9ee0b101be700ebc584c17924..5364a28e5a31b229323353a48753c86c9a81b0ca 100644 (file)
@@ -29,7 +29,7 @@ The order, in which these messages are send, is crucial with respect to the ince
 Resending the messages in correct order after a failure (or downtime) is no problem.
 But some of the messages may be send twice (or more often), because the producer does not know exactly, which messages were send successful.
 
-```
+```text
 Incident A - { id: 1,  data: "ab583cc8f8" }
 Incident B - { id: 2,  data: "83ccc8f8f8" }
 Incident C - { id: 3,  data: "115tab5b58" }
@@ -98,7 +98,7 @@ That is, our message stream is simply a mapping from names to unique sequence nu
 
 In this simplified setup, the implementation effectively boils down to the following method-override:
 
-```
+```java
 @Override
 public Iterable<String> transform(String value)
 {
@@ -126,7 +126,7 @@ public Iterable<String> transform(String value)
 We can use our `ValueTransformer` with **`flatTransformValues()`**,
 to let Kafka Streams drop the detected duplicate values:
 
-```
+```java
 streamsBuilder
     .stream("input")
     .flatTransformValues(
index 68436226053ec005c3d4e18ef09a01f99b9b31b0..4b1463350983cdf8fc77e2e631f0d0e765dc4294 100644 (file)
@@ -28,7 +28,7 @@ We will:
 
 Additionally Beans can be added programatically very easy with the help of an `ApplicationContextInitializer`:
 
-```
+```java
 @AllArgsConstructor
 public class MultipleBeansApplicationContextInitializer
     implements
@@ -76,7 +76,7 @@ _The initializer cannot be instantiated and autowired by Spring!_
 
 If you write an **`EnvironmentPostProcessor`**, you will get access to an instance of `ConfigurableEnvironment`, that contains a complete list of all `PropertySource`'s, that are configured for your Spring-Boot-App.
 
-```
+```java
 public class MultipleBeansEnvironmentPostProcessor
     implements
       EnvironmentPostProcessor
@@ -111,7 +111,7 @@ The property names are consistently represented in standard Java-Properties-Nota
 Finally, you have to [register](https://docs.spring.io/spring-boot/docs/current/reference/html/howto.html#howto-customize-the-environment-or-application-context "Read more on details and/or alternatives of the mechanism") the `EnvironmentPostProcessor` with your Spring-Boot-App.
 This is done in the **`META-INF/spring.factories`**:
 
-```
+```properties
 org.springframework.boot.env.EnvironmentPostProcessor=\
   de.juplo.demos.multiplebeans.MultipleBeansEnvironmentPostProcessor
 ```
index 3eb6b4a0242a00a9be1a83ce4c052e1ca945f9e1..c6bb8cda2f4799620996795bb6339f354176f7b3 100644 (file)
@@ -72,7 +72,7 @@ _In order to tackle this chicken-egg-problem, we will fool our locally running b
 On Linux/Unix this can be simply done by editing **`/etc/hosts`**.
 You just have to add the domain ( `example.com`) at the end of the line that starts with `127.0.0.1`:
 
-```hosts
+```text
 127.0.0.1      localhost example.com
 
 ```
index e59a4da26ed9c2dbc0217886e4aa0fc10c3e9ae3..f2b1fde526b0bef86daccaff0897405abf389773 100644 (file)
@@ -42,7 +42,7 @@ It enables us, to mock away the other layers of the application and concentrate
 Consider the following controller, that defines a request-handling and an accompanying exception-handler, for an
 `IllegalArgumentException`, that may by thrown in the business-logic:
 
-```
+```java
 @Controller
 public class ExampleController
 {
@@ -75,7 +75,7 @@ The exception-handler resolves the exception as `400: Bad Request` and renders t
 With the help of `@WebMvcTest`, we can easily mock away the actual implementation of the business-logic and concentrate on the code under test:
 our specialized exception-handler.
 
-```
+```java
 @WebMvcTest(ExampleController.class)
 class ExceptionHandlingApplicationTests
 {
index 9dcd71988f492d1b01b7eccc1398718cdb081300..8f21abfa05d8dc772da49c50453e85cbbb19ff31 100644 (file)
@@ -58,7 +58,7 @@ a (very!) simplistic service takes registration orders for new users.
   Location: http://localhost:8080/users/peter
   ```
 - Requests to registrate an already existing user will result in a 400 (Bad Request):
-  ```
+  ```shellsession
   $ echo peter | http :8080/users
 
   HTTP/1.1 400
@@ -67,7 +67,7 @@ a (very!) simplistic service takes registration orders for new users.
   Date: Fri, 05 Feb 2021 14:44:53 GMT
   ```
 - Successfully registrated users can be listed:
-  ```
+  ```shellsession
   $ http :8080/users
 
   HTTP/1.1 200
index ebc5660ea3ae98695a0a74f2d21786efe563788e..b0f484888ab0104c95c63e6fe181f40bc1e1305c 100644 (file)
@@ -78,7 +78,7 @@ publisher.publishEvent(
 
 The event takes a key ( `username`) and an object as value (an instance of an enum in our case).
 An `EventListener` receives the events and writes them in the outbox table:
-``` 
+```java
 @TransactionalEventListener(phase = TransactionPhase.BEFORE_COMMIT)
 public void onUserEvent(OutboxEvent event)
 {