0


<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.0.9</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.springboot.learning</groupId>
    <artifactId>Springboot-snippets</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>Springboot-snippets</name>
    <description>This is spring boot starter</description>
    <properties>
        <java.version>17</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mysql</groupId>
            <artifactId>mysql-connector-j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <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-starter-data-jpa</artifactId>
            <scope>provided</scope>
        </dependency>
        
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
    </dependencies>
    
</project>

RestController:

@RestController
@RequestMapping("/product/api")
@Slf4j
public class ProductController {
    
    

    @GetMapping
    public String helloWorld() {
        log.info("Returing the hello world");
        return "Hello World";

    }
}

Application.yml

spring:
  application:
    name: spring-snippets
  datasource:
    username: root
    password: 
    url: jdbc:mysql://localhost:3306/abc
  jpa:
    show-sql: true
    hibernate:
      ddl-auto: update

Hi, I am using spring boot 3.x.x for my project . Before adding the Actuator to the pom.xml my Endpoint http://localhost:8080/product/api is working fine but after adding the spring actuator starter it is giving 404
Here , I am attached the pom.xml and application.yml and Restcontroller above. Even i have issues with Hal-browser same as like.

Can someone help me out

0 Answers0