If we have 2 micro services like employee and department, then can we do association mapping between employee and department entity class?
Have you inherited the method SpringBootInitializer in the main class?
SpringBootServletInitializer ?
Can anyone reply on this please?
Anyone here already working in a company on springboot or Microservices?
Everything is fine
Have you inherited the method SpringBootInitializer in the main class?



extend SpringBootServletInitializer

*SpringBootServletInitializer
Yah for embedded servers this is optional but to run on external this is required

public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Application.class);
}
}

@SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Application.class);
}
}
Its not required

If this doesn’t work then I am afraid you need to downgrade you r tomcat version
I have choose jar so it is not working in external server it should be war
That’s the reason

If this doesn’t work then I am afraid you need to downgrade you r tomcat version
Thank you bro for replying

I have choose jar so it is not working in external server it should be war
That’s the reason
okay

Thank you bro for replying
You’re welcome

@SpringBootApplication
public class Application extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(Application.class);
}
}
Actually it’s required when you are going to deploy in tomcat container as war…. To just run in browser temporarily it’s not required I think… Correct me if iam wrong
I need to generate a column and by default it is having null values. I have specified @notnull attribute.
I am getting the error as :
Null value in col xyz of relation abcd violates not-null constraint

In other word, can two different entities in two different microservices have a relationship like @OneToMany
Can anyone reply on this please?