Home > other >  Where the Camel Application is started?
Where the Camel Application is started?

Time:06-17

I have installed enter image description here

How do you know exactly at what port application is locally loaded? How can I change it? I have found no configurations about...

CodePudding user response:

You do not need to provide a port. The debugger is attaching directly to the application using its pid. You need to be sure that the camel-debug dependency is added. I recommened to add it through a profile like shown here https://github.com/apache/camel-examples/blob/d1e5022bb1b43565903359aefaf91bcf23fc9c78/examples/main/pom.xml#L105-L120

Please note that you need a recent version of Camel (3.16 I think)

CodePudding user response:

Make sure to have the camel-maven-plugin declared and configured in your project descriptor (pom.xml):

<project>

    <!-- other configuration -->

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-maven-plugin</artifactId>
                <version>${camel.version}</version>
                <configuration>
                    <logClasspath>false</logClasspath>
                    <mainClass>some.package.Main</mainClass>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

The camel-maven-plugin will handle running your application given that your configure your application some.package.Main is under your project (be-dochub) sources directory (src/main/java).

Once your project is properly set up, you should be able to click on the Debug button from IntelliJ IDEA toolbar.

  • Related