File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -248,4 +248,21 @@ public class MyComponent {
248248 Ph ương thức bind (bindMyService): Được gọi khi MyService có sẵn trong Service Registry .
249249 Ph ương thức unbind (unbindMyService): Được gọi khi service bị gỡ khỏi Registry .
250250❗ Đây là cách tốt để xử lý service lifecycle (khi service bị remove).
251- ```
251+ ```
252+
253+ ## 0.
254+ ` .settings/org.eclipse.pde.ds.annotations.prefs `
255+
256+ dsVersion=V1_4 # Sử dụng phiên bản Declarative Services 1.4 (OSGi R7)
257+
258+ eclipse.preferences.version=1 # Phiên bản định dạng file .prefs (mặc định của Eclipse)
259+
260+ enabled=true # Bật xử lý annotation DS (bắt buộc để sinh file XML)
261+
262+ generateBundleActivationPolicyLazy=true # Tự động thêm "Bundle-ActivationPolicy: lazy" vào MANIFEST.MF
263+
264+ path=OSGI-INF # Thư mục sẽ chứa file XML được sinh (mặc định là OSGI-INF)
265+
266+ validationErrorLevel=error # Nếu annotation sai thì hiện lỗi trong Eclipse (mức: error)
267+
268+ validationErrorLevel.missingImplicitUnbindMethod=error # Báo lỗi nếu thiếu unbind method khi dùng @Reference
You can’t perform that action at this time.
0 commit comments