spring - Using one Java source file in two different projects, both under development -


i developing spring (java framework server-side web-development)web application, respond client-side java application(which uses socket communication) json object. @ same time, i'm working on both server-side , client-side java applications.

the problem have bunch of files(say, json variable interfaces) being used @ both projects. now, have duplicate copies of interface, in different packages in 2 projects. causes inconsistency, because have update both files whenever need make change in interface.

does have neat solution this?

thanks

you should treat shared code @ package level , not file level.

you should create package of interface definitions used both client , server side of architecture , whenever package changes, both sides have change accordingly.

edit:

i wasn't explicit zellus' suggestion importing common code jar one.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -