情况说明
多人开发,每个人有自己的数据库(同一个数据库的话会相互影响),而且不想每次提交代码后都重新设置数据库,所以使用spring.profiles.active指向数据库配置(这样以后就小改一下自己的数据库配置就可以了),后来发现jmix插件检测不到spring.profiles.active配置的文件,默认排在第一的配置文件生效
多人开发,每个人有自己的数据库(同一个数据库的话会相互影响),而且不想每次提交代码后都重新设置数据库,所以使用spring.profiles.active指向数据库配置(这样以后就小改一下自己的数据库配置就可以了),后来发现jmix插件检测不到spring.profiles.active配置的文件,默认排在第一的配置文件生效
你好,能发一下各个 properties 文件配置看看吗?
好的
application.properties
spring.profiles.active=kgj
jmix.ui.login-screen-id = ef_LoginScreen
jmix.ui.main-screen-id = ef_MainScreen
jmix.ui.menu-config = cn/edu/hitwh/ef/menu.xml
jmix.ui.composite-menu = true
jmix.core.available-locales = zh_CN,en
jmix.localfs.storageDir = D://EF/file-storage
logging.level.org.atmosphere = warn
jmix.ui.widget-set=cn.edu.hitwh.ef.widgets.CustomWidgetSet
jmix.ui.theme.name=helium-extended
jmix.ui.theme-config=cn/edu/hitwh/ef/theme/helium-extended-theme.properties
spring.main.allow-bean-definitionoverriding = true
spring.thymeleaf.cache = false
server.ssl.enabled=true
server.ssl.key-store-type = JKS
server.ssl.key-store = classpath:cn/edu/hitwh/ef/keystore/localhost.jks
server.ssl.key-store-password = greatmcad
server.ssl.key-alias = localhost
server.port = 8443
jmix.search.elasticsearch.url=http://localhost:9200
jmix.search.elasticsearch.login=elastic
jmix.search.elasticsearch.password=JfdfEn9c-puiOGS0lqru
jmix.search.search-index-name-prefix = ef_
# restful api id and secret
jmix.security.oauth2.client-id=ef
jmix.security.oauth2.client-secret={noop}ef
jmix.rest.services-config = rest-services.xml
jmix.rest.anonymous-url-patterns = \
/rest/services/flgInfService/getAllFlgInf,\
/rest/services/flgInfService/getFlgInfById,\
/rest/services/flgInfService/getFlgInfById*,\
/rest/services/flgInfService/getFileStringById,\
/rest/services/flgInfService/getFileStringById*,\
/rest/entities/ef_ep_FlgInf,\
/rest/entities/ef_ep_FlgInf/*
application-ef.properties
main.datasource.url = jdbc:oracle:thin:@//*.*.*.*:1521/ef
main.datasource.username = ef
main.datasource.password =efofhit
application-kgj.properties
main.datasource.url = jdbc:oracle:thin:@//*.*.*.*:1521/kgj
main.datasource.username = ef
main.datasource.password =efofhit
你好,能发下插件版本以及Jmix版本号嘛
插件版本 1.3.4-213
jmix 1.3.2
临时解决方案
1.创建一个配置模板application-template.properties
2. 不同的开发根据模板定义个人的配置文件,例如application-dev.properties
并将application-dev.properties
添加到.gitignore
中
3. 指定外部配置文件进行部署
感谢!!