Connect with us


Disable Whitelabel Error Page and Free /error Endpoint



whitelabel error page

When developing a Spring Boot application, you may encounter the default “Whitelabel Error Page” when an error occurs. This generic error page is Spring Boot’s default behavior when no custom error handling is configured. While useful during development, the Whitelabel Error Page is not suitable for production applications, as it provides little information to end-users. In this article, we will explore several approaches to removing the Whitelabel Error Page and implementing a more user-friendly error handling solution.

Living in Shadows: The Allure of r/gooncaves

Understanding Whitelabel Error Page

The Whitelabel Error Page is a default error page generated by Spring Boot when an unhandled exception occurs in your application. This error page provides a basic HTML representation of the error details, including the HTTP status code and a brief error message. The Whitelabel Error Page is useful during development as it helps in identifying and debugging errors quickly. However, in production environments, it is recommended to customize the error handling to provide more detailed and user-friendly error messages.

Disabling Whitelabel Error Page

To disable the White’label Error Page, you can use one of the following methods:

1. Property File

You can disable the White’label Error Page by setting the server.error.whitelabel.enabled property to false in your application’s or application.yml file:

      enabled: false

2. Excluding ErrorMvcAutoConfiguration

Another way to disable the White’label Error Page is to exclude the ErrorMvcAutoConfiguration bean from auto configuration. This can be done by adding the following configuration to your or application.yml file:

    exclude: org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration

Customizing Error Handling

Disabling the Whitelabel Error Page is only the first step in customizing error handling in Spring Boot. You can create a custom error page by creating a dedicated controller class to handle error handling. Here’s an example:

public class ErrorController implements org.springframework.boot.web.servlet.error.ErrorController {

    public String handleError(HttpServletRequest request) {
        Integer statusCode = (Integer) request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
        if (statusCode == HttpStatus.NOT_FOUND.value()) {
            return "error/404";
        } else if (statusCode == HttpStatus.INTERNAL_SERVER_ERROR.value()) {
            return "error/500";
        } else {
            return "error/generic";

    public String getErrorPath() {
        return "/error";

Creating a Custom Error Page

To create a custom error page, you need to add a new HTML template file to the src/main/resources/templates directory of your Spring Boot project. This file will be used to render the error page. For example, you can create a 404.html file with the following content:

html<!DOCTYPE html>
    <title>Error 404 - Page Not Found</title>
    <h1>Error 404 - Page Not Found</h1>
    <p>The requested page could not be found.</p>

Handling Exceptions Globally

To handle exceptions globally, you can create a custom exception handler. Here’s an example:

public class GlobalExceptionHandler {

    public String handleException(Exception e) {
        return "error/generic";


In this article, we have seen how to disable the White’label Error’Page and implement a custom error handling solution in Spring Boot. We have covered various methods to disable the Whitelabel Error’Page, including using properties files and excluding auto configuration beans. We have also seen how to create a custom error page and handle exceptions globally. By following these steps, you can provide more user-friendly and application-specific error responses when exceptions occur in your Spring Boot application.



1. What is the Whitelabel Error Page in Spring Boot?

The Whitelabel Error’Page is the default error page generated by Spring Boot when an unhandled exception occurs in your application. It provides a basic HTML representation of the error details, including the HTTP status code and a brief error message.

2. Why should I disable the Whitelabel Error Page?

The Whitelabel Error’Page is useful during development, but it is not suitable for production environments. It provides little information to end-users and does not align with the branding and design of your application. Disabling the Whitelabel Error’Page allows you to implement a more user-friendly and customized error handling solution.

3. How can I disable the Whitelabel Error Page in Spring Boot?

You can disable the White’label Error Page using one of the following methods:

  • Set the server.error.whitelabel.enabled property to false in your or application.yml file.
  • Exclude the ErrorMvcAutoConfiguration bean from auto configuration by adding the following to your or application.yml file: spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.web.servlet.error.ErrorMvcAutoConfiguration.

4. How do I create a custom error page in Spring Boot?

To create a custom error page, follow these steps:

  1. Create a new HTML template file (e.g., 404.html500.html) in the src/main/resources/templates directory of your Spring Boot project.
  2. Create a custom ErrorController class that implements the org.springframework.boot.web.servlet.error.ErrorController interface and maps the /error endpoint to handle different error scenarios.
  3. Optionally, create a GlobalExceptionHandler class to handle exceptions globally and map them to your custom error pages.

5. What is the purpose of the /error endpoint in Spring Boot?

The /error endpoint is a free endpoint provided by Spring Boot that is used to handle unhandled exceptions and errors in your application. When an exception occurs, Spring Boot will automatically map the request to the /error endpoint, which you can then use to handle the error and render a custom error page.

6. Can I customize the /error endpoint in Spring Boot?

Yes, you can customize the /error endpoint by creating a custom ErrorController class that implements the org.springframework.boot.web.servlet.error.ErrorController interface. This allows you to handle different types of errors (e.g., 404, 500) and render custom error pages based on the specific error that occurred.

7. What are the benefits of implementing a custom error handling solution in Spring Boot?

Implementing a custom error handling solution in Spring Boot provides several benefits:

  • Improved user experience: Custom error pages can be designed to be more user-friendly and informative, providing a better experience for your application’s users.
  • Consistent branding: Custom error pages can be aligned with the branding and design of your application, creating a cohesive and professional look and feel.
  • Detailed error information: Custom error pages can provide more detailed error information, which can be helpful for troubleshooting and debugging.
  • Flexibility: Customizing the error handling allows you to handle different types of errors (e.g., 404, 500) in a more tailored and specific way.
Continue Reading
Click to comment

Leave a Reply

Your email address will not be published. Required fields are marked *


4 Ways AI Is Transforming Online Businesses



4 Ways AI Is Transforming Online Businesses

As inflation continues to ravage the average consumer’s purchasing power, brick-and-mortar businesses are forced to adapt to the ever-changing times. That’s why they are switching to online to save and maintain their bottom lines and keep pace with consumer habits. Also, going online is a cost-saving move for many online businesses. One way these businesses are saving money is by having AI take the lead on the day-to-day operations.

1. More Efficient Cybersecurity

It doesn’t matter if you’re running a basic blog and selling a few products on your website or you’re a major online retailer like Amazon, everyone is vulnerable to cyberattacks. Online businesses rely on AI to handle their cybersecurity needs more than ever. AI first bolsters online security by checking the current network for loopholes and vulnerable spots.

The second way is to perform a deep authentication analysis for new members. When joining today’s popular online sites, it’s common to perform a deep analysis of the registration form. By requiring parts of a member’s social security number, residential address, and essential biometrics like photos and copies of photo identification, AI greatly helps online businesses prevent bad actors from entering their networks.

But even when members are successfully registered, AI’s cybersecurity duties don’t stop. Online businesses use AI for multi-factor authentication to ensure that only authenticated members gain access to the network. An online member might receive a PIN on their phone or email to verify their online business or gaming account.

2. Customer Support

Having a reliable and satisfactory customer support system is essential for the most successful online businesses to remain in business. Because AI chatbots are highly efficient, online businesses, virtual banking services, online casinos, and legal services rely on chatbots to handle the bulk of their customer service needs. Chatbots can run 24/7, already have a member’s history on file through the databases, and can provide far faster service than a human agent.

Chatbots are so efficient that many online businesses rely on them and maybe offer an optional email. This greatly allows these businesses to retool and shift funds from customer support to other vital areas to maintain profitability.

3. Fraud Detection

The nature of any online business is to receive payment for goods and services. Unfortunately, this simple procedure allows hackers or even bad members to commit fraud. Thanks again to AI, online businesses have a digital warrior best suited to detect fraud in real time. For example, thanks to behavioral AI, the online business knows each member’s normal and consistent payment patterns.

Therefore, if that member suddenly uses a new payment, the online business might request more information or ask the member to re-verify their account. Also, behavioral AI can spot in real time a member using another member’s payment details. In such cases, AI might immediately isolate that member from the network.

4. AI Delivers Personal Experiences

Tremendous effort and attention to detail go into producing a product that many online members can and will appreciate. However, statistics show members are more willing to engage if they feel a personal connection. Again, thanks to behavioral AI, it records a member’s habits—gaming and shopping preferences.

The result is personalized messages and ads directed to each member’s desires. For example, if you buy dress shirts, an online site that has an ad for socks probably won’t inspire you. However, a dynamic ad about discounted dress shirts will probably get you to open your wallet.

The Future about AI and Online Businesses

As technology improves, AI will only improve its models to better understand and respond to human behavior. As more online businesses turn to AI, look for more satisfied customers getting hooked on personalized experiences that traditional retail stores can’t provide.

Continue Reading


From Admission to Graduation: Navigating Your Master of Science in Artificial Intelligence Journey



Artificial Intelligence Journey

Key Takeaways:

  • Understanding the admission requirements is crucial to get started on your AI journey.
  • The curriculum covers various topics, from basic principles to advanced AI techniques.
  • Balancing coursework, research, and practical experience is critical to a successful graduate experience.
  • Networking and mentorship opportunities can significantly enhance your learning and career prospects.
  • Upon graduation, many career paths in AI are available, ranging from academia to industry roles.

Table of Contents:

  • Introduction
  • Admission Requirements
  • Curriculum Overview
  • Balancing Coursework and Research
  • Networking and Mentorship
  • Career Opportunities After Graduation
  • Conclusion


The journey from admission to graduation in a Master of Science in Artificial Intelligence (AI) program is an exciting and transformative experience. This path not only equips you with technical know-how but also prepares you to tackle some of the most pressing challenges in the field. This article will guide you through each phase of obtaining your degree, providing insights and tips to help you succeed. Whether you’re just considering applying or already immersed in your studies, this comprehensive guide aims to support you in making the most of your educational journey.

Admission Requirements

Getting started on your masters in Artificial Intelligence journey begins with understanding the admission requirements. Generally, applicants need to have a strong foundation in mathematics and computer science. This often includes coursework in calculus, linear algebra, statistics, and programming languages like Python or Java. Additionally, most programs require GRE scores, letters of recommendation, a statement of purpose, and, in some cases, relevant work experience. It’s essential to thoroughly research the specific requirements of each program you’re interested in, as they can vary. Preparing a compelling application involves showcasing your academic qualifications, your passion for AI, and any relevant projects or work experience you may have.

Curriculum Overview

The curriculum for a Master of Science in AI is designed to provide a comprehensive understanding of both theoretical and practical aspects of artificial intelligence. Core courses typically include machine learning, natural language processing, computer vision, robotics, and data science. Elective courses allow you to specialize in deep learning, AI ethics, and AI for healthcare. Lab sessions and projects offer hands-on experience, enabling you to apply theoretical knowledge to real-world problems. Throughout the program, you will be exposed to the latest research and developments in AI, which will prepare you for both academic and industry roles. Graduate programs also often include a capstone project or thesis requirement, where you can dive deep into a particular area of interest and contribute original research or applications to the field.

Balancing Coursework and Research

One of the most challenging aspects of a graduate program is balancing coursework, research, and practical experience. Effective time management is crucial. Create a schedule accommodating class time, study sessions, and research activities. It’s also beneficial to start thinking about your thesis early on. Select a research topic that interests you and has ample resources and faculty support. Participating in internships or collaborative projects can provide valuable practical experience and enhance your resume. Additionally, taking advantage of available resources, such as academic support services and study groups, can help you stay on track. Remember that maintaining a balanced lifestyle is also essential; allocate time for relaxation and activities that help you de-stress, ensuring you remain focused and motivated throughout your program.

Networking and Mentorship

Networking and mentorship are invaluable components of your graduate experience. Attend conferences, workshops, and seminars to stay updated on the latest advancements in AI. These events also provide networking opportunities with professionals, researchers, and fellow students. Building a solid professional network can open up opportunities for collaborations, internships, and job placements. Moreover, seek mentors who can guide, support, and give feedback on your academic and career aspirations. Many programs offer formal mentoring schemes where you can be paired with faculty members or industry professionals. Engaging actively in discussions and being open to feedback can help you grow your expertise and career prospects exponentially. Additionally, consider joining AI-focused student organizations, online forums, and professional associations to broaden your network and access more resources.

Career Opportunities After Graduation

Upon graduation, a plethora of career paths in AI await you. Whether you’re interested in academia, research, or industry roles, the skills you’ve acquired will be highly sought after. In academia, you can pursue a Ph.D. or take up teaching roles. Industry positions range from AI researchers, data scientists, and machine learning engineers to AI ethics and policy-making roles. The technology sector, healthcare, finance, and creative industries increasingly seek AI expertise, making the job market diverse and expansive.

Furthermore, there are numerous emerging fields where AI is applied, such as autonomous vehicles, smart cities, and natural language generation. By staying abreast of market trends and continually enhancing your skills, you can find a career path that is both fulfilling and impactful. Many organizations also offer continuous education and professional development opportunities to ensure their AI professionals stay at the cutting edge of technology.


The journey through a Master of Science in Artificial Intelligence program is a rewarding endeavor that prepares you for a dynamic and impactful career. By understanding admission requirements, mastering the curriculum, balancing coursework with research, and leveraging networking opportunities, you can successfully navigate the challenges and reap the benefits of this transformative academic experience. As AI continues to evolve and integrate into various sectors, the knowledge and skills you acquire will place you at the forefront of innovation and progress. In this ever-changing field, your ability to adapt and continuously learn will be your greatest asset, equipping you to make meaningful contributions to society and the field of AI. Embrace the journey with determination and curiosity, and you will find yourself well-prepared to tackle the future of artificial intelligence.

Continue Reading


How a Complete Solar Power System Can Make You Energy-Independent



complete solar power system

Understanding how a complete solar power system can grant you energy independence is simpler than you might think. Imagine powering your home with the sun’s rays, cutting down on utility bills, and reducing your carbon footprint all at once.

By installing solar panels, an inverter, and energy storage, you harness free, renewable energy right from your rooftop. Curious about how this works and what steps to take? Read on to discover the benefits and ease of becoming energy-independent with solar power.

Benefits of a Complete Solar Power System

Here are some of the key advantages you can expect from a complete solar power system. These benefits not only enhance your lifestyle but also contribute positively to the environment and your finances.

Financial Savings

Investing in a solar system kit can lead to significant financial savings. By generating your own electricity, you reduce your monthly utility bills. Over time, these savings can add up and offset the initial cost of the solar system kit.

Additionally, many regions offer tax incentives and rebates for installing solar panels, further lowering the overall expense. With a solar system kit, you are protected against rising energy costs, providing long-term financial stability.

Energy Independence

One of the main benefits of solar power is energy independence. When you generate your own electricity from the sun, you do not rely on the grid. This means you are less affected by power outages or rising electricity prices. By installing a complete solar power system, you take control of your energy needs.

You can store excess energy in batteries for use when the sun is not shining. This ensures you always have a reliable power source. Energy independence also means you are contributing to a more sustainable future.

How to Transition to Solar Power

Here are the steps to help you smoothly transition to using solar power. These guidelines will assist you in understanding what is involved, from the initial decision-making process to the final installation and beyond.

Assess Your Energy Needs

Before installing a solar house kit, it is important to evaluate how much energy your home consumes. Start by reviewing your past utility bills to find out your average monthly energy usage. This information will help you determine the size of the solar house kit you need.

Also, consider any future changes that might affect your energy use, like adding new appliances or an electric vehicle. By understanding your energy needs, you can select a solar house kit that will provide enough power for your home and help you achieve energy independence.

Consult With a Solar Energy Expert

Consulting with a solar energy expert is crucial for a smooth transition to solar power. An expert can help you choose the best system for your home. They will assess your roof’s condition and orientation. This ensures you get maximum sunlight.

Experts also provide detailed cost estimates. They can inform you about available tax incentives and rebates. With their guidance, you can make informed decisions. Their support ensures your solar installation is efficient and effective.

Learn All About Complete Solar Power System

Switching to complete solar power system can seem like a big task, but it’s really just about putting up panels, an inverter, and some batteries. You’ll save money on bills and won’t worry about power cuts.

Plus, you’re helping the planet. With some expert advice and the right planning, you can easily make the switch and enjoy all the benefits of having your own solar power system.

Visit our blog for more!

Continue Reading