Archived
Search downloaded every post to every visitor and filtered the list with String.includes, so it could only ever match what a summary carries — a phrase from the body of a post was unfindable, and the cost grew with each post published. It is now a query (/api/posts/search) that searches the body too. The home page picked 'the latest post' by taking element zero of that list, which was only correct for as long as the API happened to return posts in that order. /api/home now decides what leads, what counts as recent, and the tag counts, in one call. Tag counting moves out of the controller into TagService, shared by both. The LIKE escaping needed an explicit ESCAPE clause: there is no default escape character to rely on, and posts are markdown full of literal backslashes — escaping with a backslash turned a search for '%' into a search for backslashes and matched unrelated posts. Caught by the new tests. Also on platform 0.1.6 (contact-form header-injection fix).
130 lines
4.7 KiB
XML
130 lines
4.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-parent</artifactId>
|
|
<version>0.1.6</version>
|
|
<relativePath/>
|
|
</parent>
|
|
|
|
<groupId>net.reformedwitness</groupId>
|
|
<artifactId>confessions-of-grace</artifactId>
|
|
<version>0.1.0</version>
|
|
<name>Confessions of Grace</name>
|
|
<description>Reformed devotional site — posts, authors, comments, subscriptions — on the Bennett platform.</description>
|
|
|
|
<properties>
|
|
<commonmark.version>0.29.0</commonmark.version>
|
|
</properties>
|
|
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-bom</artifactId>
|
|
<version>0.1.6</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>testcontainers-bom</artifactId>
|
|
<version>1.21.4</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<!-- Platform releases live in the Gitea Maven registry (anonymous read). Declared here so Renovate
|
|
can discover new platform versions and open a bump PR. Maven still needs this repo in
|
|
settings.xml for PARENT resolution (see .gitea/ci-settings.xml). -->
|
|
<repositories>
|
|
<repository>
|
|
<id>gitea</id>
|
|
<url>https://git.thebennett.net/api/packages/austin/maven</url>
|
|
<releases><enabled>true</enabled></releases>
|
|
<snapshots><enabled>false</enabled></snapshots>
|
|
</repository>
|
|
</repositories>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-starter-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-starter-data</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-starter-storage</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.thebennett.platform</groupId>
|
|
<artifactId>platform-starter-security</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Markdown → HTML with YAML front-matter parsing (posts). -->
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark</artifactId>
|
|
<version>${commonmark.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.commonmark</groupId>
|
|
<artifactId>commonmark-ext-yaml-front-matter</artifactId>
|
|
<version>${commonmark.version}</version>
|
|
</dependency>
|
|
|
|
<!-- test -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-testcontainers</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.testcontainers</groupId>
|
|
<artifactId>junit-jupiter</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.security</groupId>
|
|
<artifactId>spring-security-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.eirslett</groupId>
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|