<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf" -->

---
title: How to Create a Spring Boot Fraud Scoring Service
description: Most Java teams deploy ML models via a Python sidecar service, adding operational complexity. Deep Netts is a pure-Java deep learning library that eliminates...
canonical: https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Create a Spring Boot Fraud Scoring Service | daily.dev
og:description: Most Java teams deploy ML models via a Python sidecar service, adding operational complexity. Deep Netts is a pure-Java deep learning library that eliminates...
og:url: https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf
og:image: https://api.daily.dev/og/posts/kbHmhzAXf.png
og:image:alt: How to Create a Spring Boot Fraud Scoring Service
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Create a Spring Boot Fraud Scoring Service

**[Foojay.io](https://daily.dev/sources/foojayio)** · 18 min read · 0 upvotes · 0 comments

## Summary

Most Java teams deploy ML models via a Python sidecar service, adding operational complexity. Deep Netts is a pure-Java deep learning library that eliminates this by letting you train, serialize, and serve models entirely within a Spring Boot application. This tutorial walks through building a production-ready fraud scoring service: training a feed-forward neural network on the Kaggle credit card fraud dataset, exporting both the model and its scaler as versioned artifacts, wrapping them in a thread-safe Spring Boot REST service using an object pool, configuring a deliberate decision threshold, adding health checks and regression tests, and handling deployment concerns like Dockerization, Kubernetes readiness probes, and licensing restrictions. Key pitfalls covered include the model/scaler mismatch bug, network statefulness requiring pooling, and the need for drift monitoring and shadow-mode rollout before going live.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://foojay.io/today/how-to-create-a-spring-boot-fraud-scoring-service>

## Questions this post answers

### How do I avoid model and scaler mismatch when deploying a Deep Netts neural network in a Spring Boot service?

Always export and version the scaler's normalization parameters (like column max values) alongside the trained model file, and ship them as a pair. The most common production bug in Java ML services is deploying the model without its matching scaler, which causes raw un-normalized inputs to saturate the network's outputs silently, with no exceptions thrown, quietly turning the fraud rate into 0% or 100%.

_Developers wiring ML models into Java services can find deployment pitfalls like this one on daily.dev._

### Why do I need an object pool instead of a single shared instance for a Deep Netts FeedForwardNetwork in a multithreaded Spring Boot app?

A Deep Netts network is stateful: calling setInput() followed by getOutput() is a two-step sequence against instance fields, so two concurrent threads sharing one instance can interleave and return each other's results without throwing or logging an error. Using a pool of independently deserialized network instances, sized to your thread count, avoids this; a synchronized block is a simpler fix if throughput is modest.

_Teams building concurrent inference services can track thread-safety gotchas like this via daily.dev._

### What are the licensing restrictions of the Deep Netts Pro free tier for production use?

The free tier permits deployment in no more than one production environment, requires annual revenue generated through the product under USD 100,000 and total company revenue under USD 1,000,000, and explicitly prohibits using it to operate or enable any hosted AI platform, managed service, or SaaS offering. An internal service at a small company may qualify, but customer-facing or multi-region use likely does not.

_Engineers evaluating library licensing constraints before shipping can keep tabs on cases like this through daily.dev._

## Similar posts on daily.dev

- [How to Build Real-Time Fraud Detection using Spark Real-Time Mode and Lakebase](https://daily.dev/posts/how-to-build-real-time-fraud-detection-using-spark-real-time-mode-and-lakebase-wjxnughd5) · databricks · 3 upvotes · 0 comments
- [What happens in the milliseconds after you tap pay](https://daily.dev/posts/what-happens-in-the-milliseconds-after-you-tap-pay-sjy8unucb) · databricks · 1 upvotes · 0 comments

---

Tags: [#machine-learning](https://daily.dev/tags/machine-learning), [#java](https://daily.dev/tags/java), [#spring-boot](https://daily.dev/tags/spring-boot), [#fraud-detection](https://daily.dev/tags/fraud-detection)

[View this post on daily.dev](https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Create a Spring Boot Fraud Scoring Service","url":"https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf"},"datePublished":"2026-07-31T08:54:03.455Z","dateModified":"2026-09-14T07:04:43.244Z","description":"Most Java teams deploy ML models via a Python sidecar service, adding operational complexity. Deep Netts is a pure-Java deep learning library that eliminates...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Foojay.io","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Foojay.io","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1820f6a6ae944760aa322b67ed85f848","url":"https://daily.dev/sources/foojayio"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"machine-learning,java,spring-boot,fraud-detection","timeRequired":"PT18M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Foojay.io","item":"https://daily.dev/sources/foojayio"},{"@type":"ListItem","position":3,"name":"How to Create a Spring Boot Fraud Scoring Service"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-to-create-a-spring-boot-fraud-scoring-service-kbhmhzaxf#faq","mainEntity":[{"@type":"Question","name":"How do I avoid model and scaler mismatch when deploying a Deep Netts neural network in a Spring Boot service?","acceptedAnswer":{"@type":"Answer","text":"Always export and version the scaler's normalization parameters (like column max values) alongside the trained model file, and ship them as a pair. The most common production bug in Java ML services is deploying the model without its matching scaler, which causes raw un-normalized inputs to saturate the network's outputs silently, with no exceptions thrown, quietly turning the fraud rate into 0% or 100%. Developers wiring ML models into Java services can find deployment pitfalls like this one on daily.dev."}},{"@type":"Question","name":"Why do I need an object pool instead of a single shared instance for a Deep Netts FeedForwardNetwork in a multithreaded Spring Boot app?","acceptedAnswer":{"@type":"Answer","text":"A Deep Netts network is stateful: calling setInput() followed by getOutput() is a two-step sequence against instance fields, so two concurrent threads sharing one instance can interleave and return each other's results without throwing or logging an error. Using a pool of independently deserialized network instances, sized to your thread count, avoids this; a synchronized block is a simpler fix if throughput is modest. Teams building concurrent inference services can track thread-safety gotchas like this via daily.dev."}},{"@type":"Question","name":"What are the licensing restrictions of the Deep Netts Pro free tier for production use?","acceptedAnswer":{"@type":"Answer","text":"The free tier permits deployment in no more than one production environment, requires annual revenue generated through the product under USD 100,000 and total company revenue under USD 1,000,000, and explicitly prohibits using it to operate or enable any hosted AI platform, managed service, or SaaS offering. An internal service at a small company may qualify, but customer-facing or multi-region use likely does not. Engineers evaluating library licensing constraints before shipping can keep tabs on cases like this through daily.dev."}}]}
```

