惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Know Your Adversary
Know Your Adversary
小众软件
小众软件
L
LangChain Blog
月光博客
月光博客
博客园 - Franky
Microsoft Azure Blog
Microsoft Azure Blog
Y
Y Combinator Blog
有赞技术团队
有赞技术团队
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
MongoDB | Blog
MongoDB | Blog
Recorded Future
Recorded Future
V
Visual Studio Blog
TaoSecurity Blog
TaoSecurity Blog
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
P
Privacy & Cybersecurity Law Blog
T
Threat Research - Cisco Blogs
D
DataBreaches.Net
L
LINUX DO - 热门话题
C
Check Point Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
The Hacker News
The Hacker News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
V
V2EX
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
博客园 - 司徒正美
T
Threatpost
P
Palo Alto Networks Blog
A
About on SuperTechFans
Spread Privacy
Spread Privacy
Engineering at Meta
Engineering at Meta
N
News | PayPal Newsroom
T
Tailwind CSS Blog
The Last Watchdog
The Last Watchdog
Blog — PlanetScale
Blog — PlanetScale
A
Arctic Wolf
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - 聂微东
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
www.infosecurity-magazine.com
www.infosecurity-magazine.com
V
Vulnerabilities – Threatpost
H
Hacker News: Front Page

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
When Your Full-Stack Framework Gets Deprecated — Planning an OSS Migration from Hilla
Takeshi Takeuchi · 2026-05-06 · via DEV Community

The Bad News

Every developer dreads the moment: the framework you built your application on is being discontinued. That's exactly what happened to us when Vaadin announced the deprecation of Hilla.

Our system is a business application providing the following features:

  • User registration and authentication
  • Product search and browsing
  • Online payment processing
  • Multi-device support (web browsers and staffed/unstaffed business terminals)

The tech stack: Spring Boot 3.x on the backend, a Lit + TypeScript SPA on the frontend. Around 20 views, 30 components, and 20 dialogs — a modest but non-trivial codebase with real-world requirements like authentication, payments, and multi-device support.

What Hilla Gave Us

For those unfamiliar, Hilla was Vaadin's full-stack framework that bridged Spring Boot backends with Lit-based frontends. It provided:

  • Hilla Endpoints — Type-safe RPC from TypeScript to Java. Annotate a Java method with @Endpoint, and a TypeScript client stub is generated automatically.
  • Authentication helpers@vaadin/hilla-frontend handled auth state, login utilities, and Spring Security integration.
  • Client-side routing@vaadin/router for SPA navigation with auth guards.
  • Connection state detection@vaadin/common-frontend provided online/offline awareness tied to endpoint calls.
  • Build tooling — A Vite plugin that handled code generation, theme application, and output placement into Spring Boot resources.

The developer experience was genuinely good. Writing a Java method and immediately calling it from TypeScript with full type safety felt almost magical. It lowered the barrier for Spring Boot engineers to work on frontend code significantly.

Then, in 2024, Vaadin announced that Hilla (specifically the Lit-based full-stack integration) would no longer be maintained. A React-based Hilla was offered as an alternative, but rewriting our entire Lit component library was not an option.

The only path forward: replace everything Hilla provided with general-purpose open-source libraries.

The Problems We Already Had

The deprecation announcement was the trigger, but if we're being honest, Hilla had been causing technical headaches well before that.

Spring Security and Session Interference

Hilla extended Spring Security and Spring Session internals in non-standard ways. This made it effectively impossible to use standard session-sharing solutions like Spring Session + Redis out of the box.

To achieve horizontal scaling behind a load balancer, we had to resort to some aggressive workarounds:

  • Reverse-engineering Vaadin's internal classes (security configuration, request utilities)
  • Using Java Reflection to access private methods and extract the framework's internal path resolution logic
  • Extending the standard CSRF token with custom fields to build a token-based authentication mechanism
  • Implementing a frontend middleware that detected 401 responses and transparently re-authenticated using the custom token
// Accessing a framework-internal private method via reflection
private String applyUrlMapping(String path) {
    try {
        Method method = RequestUtil.class.getDeclaredMethod(
            "applyUrlMapping", String.class);
        method.setAccessible(true);
        return (String) method.invoke(requestUtil, path);
    } catch (Exception e) {
        return "/";
    }
}

// Frontend: transparent re-authentication on 401
const unauthorizedHandler = async (context, next) => {
    const response = await next(context);
    if (response.status === 401 && await store.reAuthenticate()) {
        location.reload();
    }
    return response;
};

This combination achieved sticky-session-free load balancing. But it was fragile — every Vaadin version upgrade risked breaking the reflection-based hacks, and the maintenance burden was significant.

Servlet Mapping Conflicts

The other pain point was Hilla's custom servlet mappings and internal redirects.

Hilla registered its own servlet mappings to handle frontend routing, with internal redirects that intercepted requests before they reached Spring's standard handler mappings. This interfered with Swagger UI's static resource serving and the ALB's (Application Load Balancer) path-based routing rules. Debugging 404 errors became an exercise in tracing request flow through multiple interception layers. Ultimately, we had to give up on serving API documentation (Swagger UI) for our external data API entirely.

These weren't temporary annoyances — they were structural problems inherent to running Hilla alongside standard Spring ecosystem tools. The deprecation was the catalyst, but the conviction that migration would eliminate this technical debt is what made us commit to a full rewrite.

Assessing the Damage

The first task in any framework migration is a dependency audit. You need to draw a clear line between "what the framework was doing for you" and "what you built yourself."

After a thorough review, we identified five areas requiring replacement:

1. API Client (Hilla Endpoints)

The largest blast radius by far. Nearly every view depended on Hilla Endpoints for data fetching and mutations.

// Before: Hilla Endpoints
import { SomeEndpoint } from "Frontend/generated/endpoints";
const details = await SomeEndpoint.getItemDetails(itemId);

We needed a code-generation solution that could produce typed TypeScript clients from our existing API definitions.

2. Authentication (@vaadin/hilla-frontend)

Hilla abstracted away the mechanics of authentication — CSRF token handling, auth state polling, login/logout flows. All of this was bundled in @vaadin/hilla-frontend and integrated seamlessly with Spring Security.

3. Routing (@vaadin/router)

Client-side routing for 20 views, including route guards for authenticated pages and role-based access.

4. Connection State Detection (@vaadin/common-frontend)

Offline detection that was tightly coupled to Hilla's endpoint call mechanism. With business terminals in the mix, graceful handling of network interruptions was a hard requirement.

5. Build Tooling (Hilla/Vite Integration)

Hilla wrapped Vite with its own plugins for endpoint code generation, theme processing, and placing build output into Spring Boot's static resources directory. We needed to reconstruct this pipeline from scratch.

What Survived

Not everything needed replacing, and this was the silver lining:

  • Vaadin Web Components<vaadin-grid>, <vaadin-text-field>, and friends work independently of Hilla. No migration needed.
  • Lit — Our template engine. Framework-agnostic by nature.
  • MobX — State management. We had adopted it independently of Hilla.

The fact that UI components and the template engine survived intact was huge. It meant the migration could focus almost entirely on "how data is accessed" and "how screens get navigated to," leaving the visual layer untouched.

Technology Selection

With the scope clear, we moved to selecting replacements.

Area Before (Hilla) After (OSS)
API Client Hilla Endpoints OpenAPI Generator (TypeScript)
Auth @vaadin/hilla-frontend fetch + Spring Security RememberMe
Routing @vaadin/router universal-router
Offline detection @vaadin/common-frontend Custom ConnectionStateService
Build Hilla/Vite integration Vite (standalone)
State management MobX MobX (unchanged)
UI Components Vaadin Web Components + Lit Vaadin Web Components + Lit (unchanged)

Here is the reasoning behind each choice.

Why OpenAPI Generator

Our first instinct was to write fetch wrappers by hand. With 20+ endpoints, that idea lasted about five minutes. We weren't willing to give up type safety either.

Fortunately, we already had a separate set of REST APIs for external data provision, documented with SpringDoc. OpenAPI schemas were already part of our workflow. Extending the same annotation approach to our frontend-facing APIs would give us a ready-made foundation for client generation.

Generating a TypeScript client from that schema was the natural next step. We chose OpenAPI Generator's typescript-fetch generator, integrated as a Maven plugin so client code is regenerated on every build.

// After: OpenAPI Generator
import { api } from "@/api/api-client";
const details = await api.getItemDetails({ itemId });

The call syntax changes slightly — parameters become an object literal, which is OpenAPI Generator's convention — but type safety is preserved. Your IDE still catches mismatched types at development time.

Why fetch + Spring Security (No Auth Library)

We considered several frontend auth libraries but ultimately went with plain fetch calls against Spring Security endpoints. The reason was pragmatic: our auth flow was straightforward. Form-based login, RememberMe cookies, CSRF tokens — Spring Security handles all of this natively.

We did have to implement what Hilla had been hiding — fetching the CSRF token before login, managing authentication state, wiring up the auth context in MobX — but being free from Vaadin's non-standard extensions meant we could align with Spring Security's standard configuration patterns. The overall authentication flow became much easier to reason about.

Why universal-router

The routing library decision required the most deliberation. Our candidates:

  • Vaadin Router — Still available as a standalone package post-Hilla, but its long-term maintenance was uncertain. We were trying to reduce Vaadin coupling, not maintain it.
  • React Router / Vue Router — Framework-specific. Incompatible with our Lit + Web Components stack.
  • universal-router — Framework-agnostic, lightweight, excellent TypeScript support.

The deciding factor was framework independence. Our Lit + Web Components architecture was intentionally decoupled from any specific framework. The router should follow the same philosophy.

As a bonus, universal-router's API was similar enough to @vaadin/router that route definitions could be migrated with minimal rewriting.

Why Custom Connection State Detection

The ConnectionState from @vaadin/common-frontend was tightly coupled to Hilla's endpoint mechanism. With Hilla Endpoints gone, it couldn't function as-is.

We could have relied on navigator.onLine and the browser's online/offline events, but that only detects local network connectivity — not whether the server is actually reachable. For business terminals that might have a LAN connection but lose internet access, this distinction matters.

We built a ConnectionStateService that derives connection state from actual API call results. If requests start failing with network errors, the state transitions to offline. When they succeed again, it transitions back. Simple, but grounded in reality rather than browser heuristics.

Migration Strategy — Layer by Layer

With technology choices locked in, the question became: in what order do we migrate 70+ TypeScript files?

The "big bang" approach — rewrite everything at once — was off the table. Too much risk, too hard to debug when things go wrong. Instead, we adopted a layered migration strategy.

Step 1: Services, Stores, and Helpers

The first wave targeted the infrastructure layer — everything that sits between the UI and the outside world:

  • Replace the API client (Hilla Endpoints → OpenAPI Generator)
  • Implement the authentication service
  • Replace the routing foundation
  • Implement connection state detection
  • Migrate shared utilities

Critically, no UI components were touched in this step. The goal was to stabilize the foundation before building on top of it.

Checkpoint: npx tsc --noEmit

We used TypeScript's compiler as our Step 1 acceptance test. Running npx tsc --noEmit verifies that all types resolve, all imports exist, and all function signatures match — without actually building anything. When this produced zero errors, we had confidence that the API call signatures were correct and the dependency graph was intact.

Step 2: UI Components

With the infrastructure stable, we moved to views, components, and dialogs:

  • Rewrite route definitions for universal-router
  • Replace API calls in each view with the new client
  • Wire up authentication guards
  • Remove all Hilla-specific imports

Checkpoint: npm run build

The acceptance test for Step 2 was a full production build. Vite's build process plus TypeScript compilation with zero errors meant the migration was mechanically complete.

Step 3: Quality Review

The final step was a file-by-file comparison between the pre-migration and post-migration codebases. We categorized every difference into one of two buckets:

  • Intentional changes — Different API call syntax, new routing API usage, restructured auth flow. Expected and correct.
  • Needs fixing — Logic accidentally dropped during migration, edge cases not handled, subtle behavioral changes.

This review was tedious but invaluable. It caught several unintended behavioral changes that would have been production bugs. When you're making sweeping changes across dozens of files, it's easy to accidentally delete a null check or change the order of operations.

Why This Order Matters

The layered approach exists to isolate failure domains.

When Step 1 stabilizes the API client and auth infrastructure, Step 2 can focus purely on UI concerns. If a view doesn't render correctly after migration, you know the problem is in the view code — not in the underlying API client or auth service. Without this separation, debugging becomes a nightmare of "is this a plumbing issue or a UI issue?"

Series Roadmap

This series covers the full migration across five articles.

Part Topic Summary
Part 1 (this article) Migration strategy Dependency audit, technology selection, migration plan
Part 2 OpenAPI Generator Replacing Hilla Endpoints — circular dependencies, Date types, and Base64 encoding gotchas
Part 3 Routing + state management universal-router + MobX + Lit integration — MobX strict mode pitfalls, real device vs. DevTools behavior gaps
Part 4 Spring Security Multi-chain security architecture + Spring Session — 10 filter chains, SessionRepositoryFilter, and AuthenticationManager design
Part 5 Final polish Path unification, packaging, embedded services — finally enabling Swagger UI, trailing slash headaches, fat JAR scope issues, config import patterns

Starting from Part 2, we'll dive into the specific problems we encountered and how we solved them, with plenty of code examples. Framework migrations never go exactly as planned — that's precisely why they're worth documenting.