in the springboot project in intellij idea, start the springboot project by running the main method of application.
but in maven"s pom.xml, profile, is configured to take these profile into account if it is running.
for example, I provided two profile, in pom, one for activemq, and one for kafka,. I want to load different message dependencies under different profile.
but if you start the main method directly in application, you will always report an error because when you are in one of the profile, the code in the code about the other kind of message will report an error because the dependency cannot be found.
the following code is the two profile. configured in pom
https://pan.baidu.com/s/1fGd-.
you can go down, import it into idea, and test