-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
discussion of name and location of default property file #31
Comments
I'm rather -1 as this would mean we would accidentally pick up spring config files which have different semantics than we do. If one wants to pick them up he can simply define an own ConfigSource for it anyway |
META-INF is fine, yes. But I think it would make sense to support root folder, too.
ok, application is already used by spring. Actually I ask myself what different semantics a spring config file has? Isn’t that the same property file format that we support?
… Am 01.12.2017 um 10:04 schrieb Mark Struberg ***@***.***>:
I'm rather -1 as this would mean we would accidentally pick up spring config files which have different semantics than we do.
META-INF is also perfectly fine imo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#31 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AJAaB3Qzx8HzRMZUyG4W85rK7uc1lEtpks5s78EjgaJpZM4Qx-D6>.
|
I also prefer |
I prefer using META-INF. Here is a extract from guide jar :
For application.properties, i am fear that confusion with spring config |
+1 to load files from root. META-INF is a valid location but we can consider these two locations as a hierarchy structure for properties +1 to application.properties or configuration properties although i would prefer application.properties. Is there any problem if we load the Spring properties? |
-1 to pick up from root. You can write your own config source to parse this file. The default one on the classpath which means META-INF for jar, WEB-INF\classes\META-INF for war. It is nice and clean. Also it is very similar to CDI's beans.xml location. |
ack to what Emily writes. Also -1 to pick up from root. Basically all EE config files are located in META-INF/ or WEB-INF/ Btw, we explicitly left out WEB-INF/javaconfig.properties btw. Don't want to repeat the merge nonsense we had to do in CDI. Also ack to not using application.properties as this would create a big mess with Spring. |
@sdaschner suggests to change the file name javaConfig.propertie to application.properties. The properties can be loaded by either Spring or JavaEE config impl. I think it is a good idea. |
If the Spring folks are not offended, why not, but doing a bit with Spring Boot and different types of clouds myself, the concept of profiles would probably exceed this JSR, so a multi-profile Spring configuration or overrides just won't be picked up correctly? |
Sorry @sdaschner @Emily-Jiang , but name change is not sufficient. Spring loads property file in root folder (doc) We must decide if we support spring model or not. A implementation can define an specific PropertySource that he use Spring model |
I'm not passionate about the location, the I also don't see the collision with Spring -- even if that file were in the root folder. These are just two different technologies loading the same properties file -- if developers for some reason would like to choose between technology A loading configuration or technology B, that doesn't collide. They could even use both at the same time... Having that said, the discussion whether we use the properties location together with a |
+1 to pick up from root |
If it was |
yes, good point about APP-INF. But as written above I tried to avoid all that by explicitly only targeting classpath entries. So no WEB-INF or APP-INF at all. Just add your config into a jar or WEB-INF/classes/META-INF/javaconfig.properties PS: yes I basically like the name application.properties, but I really fear it will become a mess because Spring uses it already. So I prefer to stick with META-INF/javaconfig.properties. One can add custom ConfigSources for any other name anyway! |
APP-INF is bad because that's do reference at EAR. Several container don't support this type of module. (ex: tomcat) META-INF is more neutral. It's valid for classic JAR (META-INF), WAR (WEB-INF/classes/META-INF) and EAR (_META-INF) |
Tallying this now: There is still a discussion about the actual file name.
|
The name we decide on will also impact #7 |
|
Agree with @keilw about application.properties. It's clear and direct. About pick multiple files, i think we should focus in only one and if the developer wants others he/she can create a configSource. |
@jeyvison @keilw While application.properties is the same file name as spring, it's content is totally different. Spring has some nested syntax while we basically have old-style property files. |
That's true about YAML files(What spring can read by default) but i don't know if it happens for plain property files. Would you have an example ? When you say nested, you say something like this?
|
I vote for It unambiguously specifies that this properties file is about
|
I'm more leaning towards In my mind when looking from afar, |
eclipse#26 - remove the ConfigConverterHelper
Let's discuss more and vote. @sdaschner will set up a vote. |
+1 for The whole ticket are a thing from the past, by the time this spec might be finished it won't be allowed to use
|
If the meetings change is it possible to update Google Calendar next time? |
Based on #26 I had a look at the
spec
and saw that we currently define the default config properties file asMETA-INF/javaconfig.properties
. Actually I'm not really happy with the name and the place. I think that theMETA-INF
folder is a valid option but would prefer to add support for a properties file in the root folder (conflicts can be handled by ordinal). Next to this I ask myself ifjavaconfig.properties
as a name really makes sense? Why not using something likeapplication.properties
(as spring does)?The text was updated successfully, but these errors were encountered: